summaryrefslogtreecommitdiff
path: root/git-dch
diff options
context:
space:
mode:
authorGuido Guenther <agx@sigxcpu.org>2007-10-19 09:51:28 +0200
committerGuido Guenther <agx@sigxcpu.org>2007-10-19 09:51:28 +0200
commitb4eeccec20f52d4118c97a698d23fa569e27799b (patch)
tree66d2ba06d6c4d326dc5866d9b215fa2c0313f3ba /git-dch
parent53d0b13794018f88dcd2df017667e173bb333abf (diff)
downloadgit-buildpackage-b4eeccec20f52d4118c97a698d23fa569e27799b.tar.gz
git-buildpackage-b4eeccec20f52d4118c97a698d23fa569e27799b.tar.bz2
git-buildpackage-b4eeccec20f52d4118c97a698d23fa569e27799b.zip
git-dch: use Command() instead of implementing it again
Diffstat (limited to 'git-dch')
-rwxr-xr-xgit-dch11
1 files changed, 4 insertions, 7 deletions
diff --git a/git-dch b/git-dch
index 078142bb..c78702ec 100755
--- a/git-dch
+++ b/git-dch
@@ -28,6 +28,7 @@ from gbp.git_utils import (GitRepositoryError, GitRepository, build_tag)
from gbp.config import GbpOptionParser
from gbp.errors import GbpError
from gbp.deb_utils import parse_changelog
+from gbp.command_wrappers import (Command, CommandExecFailed)
snapshot_re = "\s*\*\* SNAPSHOT build @(?P<commit>[a-z0-9]+)\s+\*\*"
@@ -49,13 +50,9 @@ def get_log(start, end, options, paths):
def system(cmd):
try:
- ret = subprocess.call(cmd, shell=True)
- if ret < 0:
- raise GbpError, "Command '%s' terminated by signal %d" % (cmd, -ret)
- elif ret > 0:
- raise GbpError, "Command '%s' exited with %d" % (cmd, ret)
- except OSError, e:
- raise GbpError, "Execution of '%s' failed: %s" % (cmd, e)
+ Command(cmd, shell=True)()
+ except CommandExecFailed:
+ raise GbpError
def add_changelog_entry(msg, author):