diff options
author | Guido Guenther <agx@sigxcpu.org> | 2007-10-19 09:51:28 +0200 |
---|---|---|
committer | Guido Guenther <agx@sigxcpu.org> | 2007-10-19 09:51:28 +0200 |
commit | b4eeccec20f52d4118c97a698d23fa569e27799b (patch) | |
tree | 66d2ba06d6c4d326dc5866d9b215fa2c0313f3ba | |
parent | 53d0b13794018f88dcd2df017667e173bb333abf (diff) | |
download | git-buildpackage-b4eeccec20f52d4118c97a698d23fa569e27799b.tar.gz git-buildpackage-b4eeccec20f52d4118c97a698d23fa569e27799b.tar.bz2 git-buildpackage-b4eeccec20f52d4118c97a698d23fa569e27799b.zip |
git-dch: use Command() instead of implementing it again
-rwxr-xr-x | git-dch | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -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): |