From: Magnus Hagander Date: Thu, 21 Feb 2013 16:15:13 +0000 (+0100) Subject: Use subprocess.call instead of execvp to call the git command X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=37f77a1ad6505e90eb88b4ad557c6fa0f66df65b;p=pggit.git Use subprocess.call instead of execvp to call the git command Without doing this, we never return, and thus never fire the triggers. --- diff --git a/pggit.py b/pggit.py index 1ac9251..70e6b1c 100755 --- a/pggit.py +++ b/pggit.py @@ -17,6 +17,7 @@ import sys import os import os.path import psycopg2 +import subprocess import ConfigParser from datetime import datetime @@ -117,7 +118,7 @@ class PgGit(object): def run_command(self): self.logger.log("Running \"git shell %s %s\"" % (self.command, "'%s'" % self.path)) - os.execvp('git', ['git', 'shell', '-c', "%s %s" % (self.command, "'%s'" % self.path) ]) + subprocess.call(['git', 'shell', '-c', "%s %s" % (self.command, "'%s'" % self.path)]) def run(self): try: