aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp/scripts/import_dscs.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2013-04-29 20:55:40 +0200
committerGuido Günther <agx@sigxcpu.org>2013-04-29 21:14:18 +0200
commit43e60bb76e80c6ca7be1ee1da582fe78c5465349 (patch)
tree415cea02d452df14d26c25344601c7be3b03fe9b /gbp/scripts/import_dscs.py
parent45c2346f6a52aec196dd89b8d09d8b06d05b8867 (diff)
Make parse_dsc a classmethod of DscFile
so we have the object creation close to the object itself.
Diffstat (limited to 'gbp/scripts/import_dscs.py')
-rw-r--r--gbp/scripts/import_dscs.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/gbp/scripts/import_dscs.py b/gbp/scripts/import_dscs.py
index 565f6df2..e15808f6 100644
--- a/gbp/scripts/import_dscs.py
+++ b/gbp/scripts/import_dscs.py
@@ -21,7 +21,8 @@ import os
import sys
import tempfile
import gbp.command_wrappers as gbpc
-from gbp.deb import parse_dsc, DpkgCompareVersions
+from gbp.deb import DpkgCompareVersions
+from gbp.deb.dscfile import DscFile
from gbp.errors import GbpError
from gbp.git import GitRepository, GitRepositoryError
from gbp.scripts import import_dsc
@@ -119,7 +120,7 @@ def main(argv):
else:
for arg in argv[::-1]:
if arg.endswith('.dsc'):
- dscs.append(parse_dsc(arg))
+ dscs.append(DscFile.parse(arg))
import_args.remove(arg)
if not use_debsnap and not dscs:
@@ -128,7 +129,7 @@ def main(argv):
if use_debsnap:
dirs['tmp'] = os.path.abspath(tempfile.mkdtemp())
- dscs = [ parse_dsc(f) for f in fetch_snapshots(pkg, dirs['tmp']) ]
+ dscs = [ DscFile.parse(f) for f in fetch_snapshots(pkg, dirs['tmp']) ]
dscs.sort(cmp=dsc_cmp)
importer = GitImportDsc(import_args)