diff options
author | Guido Günther <agx@sigxcpu.org> | 2017-08-03 17:54:33 -0300 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2017-08-03 17:54:33 -0300 |
commit | 88e74cfd8cae684ae4b3320f9da30e89497479d2 (patch) | |
tree | 00ec21ae0f19e4f1084cf9d39a161d63ed9aa609 /gbp/deb | |
parent | 68cfda104af42a06c416409400b8548702ad6468 (diff) |
Simplify compression handling
so we don't need to pass that many parameters around and
have compression parameters in on place.
Diffstat (limited to 'gbp/deb')
-rw-r--r-- | gbp/deb/policy.py | 4 | ||||
-rw-r--r-- | gbp/deb/pristinetar.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/gbp/deb/policy.py b/gbp/deb/policy.py index 75e78792..6ea80fe4 100644 --- a/gbp/deb/policy.py +++ b/gbp/deb/policy.py @@ -23,7 +23,7 @@ like allowed characters in version numbers, etc. import os import re -from gbp.pkg import (PkgPolicy, compressor_opts) +from gbp.pkg import PkgPolicy, Compressor class DebianPkgPolicy(PkgPolicy): @@ -85,7 +85,7 @@ class DebianPkgPolicy(PkgPolicy): @return: the tarballs name corresponding to the input parameters @rtype: C{str} """ - ext = compressor_opts[compression][1] + ext = Compressor.Exts[compression] sub = '-{0}'.format(component) if component else '' tarball = "%s_%s.orig%s.tar.%s" % (name, version, sub, ext) if dir: diff --git a/gbp/deb/pristinetar.py b/gbp/deb/pristinetar.py index a80fd4b3..bb034e77 100644 --- a/gbp/deb/pristinetar.py +++ b/gbp/deb/pristinetar.py @@ -16,7 +16,7 @@ # <http://www.gnu.org/licenses/> """Handle checkin and checkout of archives from the pristine-tar branch""" -from gbp.pkg import compressor_opts +from gbp.pkg import Compressor from gbp.pkg.pristinetar import PristineTar from gbp.deb import DebianPkgPolicy @@ -38,7 +38,7 @@ class DebianPristineTar(PristineTar): if not comp_type: ext = '\w\+' else: - ext = compressor_opts[comp_type][1] + ext = Compressor.Exts[comp_type] name_regexp = '%s_%s\.orig\.tar\.%s' % (package, version, ext) |