diff options
author | Guido Günther <agx@sigxcpu.org> | 2010-12-26 22:07:28 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2010-12-28 00:15:13 +0100 |
commit | 91b0aa890c5282746557ada7faa4b9a4353b23b4 (patch) | |
tree | 00d681367336fda4272e58b468b306d6de6bfe12 /git-import-dsc | |
parent | b23f05bd62734439c845be1c0c322eabb4d5bcb6 (diff) |
pychecker warning cleanups
(mostly unused variables and imports)
Diffstat (limited to 'git-import-dsc')
-rwxr-xr-x | git-import-dsc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/git-import-dsc b/git-import-dsc index db15e4c3..9c96f024 100755 --- a/git-import-dsc +++ b/git-import-dsc @@ -59,9 +59,8 @@ def download_source(pkg, dirs): return dsc -def apply_patch(diff, unpack_dir): +def apply_patch(diff): "Apply patch to a source tree" - d = os.path.abspath(unpack_dir) pipe = pipes.Template() pipe.prepend('gunzip -c %s' % diff, '.-') pipe.append('patch -p1 --quiet', '-.') @@ -76,9 +75,9 @@ def apply_patch(diff, unpack_dir): return True -def apply_deb_tgz(deb_tgz, unpack_dir): +def apply_deb_tgz(deb_tgz): """Apply .debian.tar.gz (V3 source format)""" - unpackArchive = gbpc.UnpackTarArchive(deb_tgz, ".")() + gbpc.UnpackTarArchive(deb_tgz, ".")() return True @@ -89,10 +88,10 @@ def apply_debian_patch(repo, unpack_dir, src, options, parents): try: os.chdir(unpack_dir) - if src.diff and not apply_patch(src.diff, unpack_dir): + if src.diff and not apply_patch(src.diff): raise GbpError - if src.deb_tgz and not apply_deb_tgz(src.deb_tgz, unpack_dir): + if src.deb_tgz and not apply_deb_tgz(src.deb_tgz): raise GbpError if os.path.exists('debian/rules'): @@ -104,7 +103,6 @@ def apply_debian_patch(repo, unpack_dir, src, options, parents): author, email = parseaddr(dch['Maintainer']) if not (author and email): gbp.log.warn("Failed to parse maintainer") - commit = repo.commit_dir(unpack_dir, "Imported Debian patch %s" % version, branch = options.debian_branch, |