summaryrefslogtreecommitdiff
path: root/gbp/scripts
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2013-08-23 13:39:19 +0300
committerGuido Günther <agx@sigxcpu.org>2014-07-24 20:18:30 +0200
commit86e1ba6bf098433f08c46585b6103e7efa2f0e48 (patch)
tree3dcf9df3ced3888948e063270f49ed01a0a2e9be /gbp/scripts
parentdbfc6276c4aa50b79f1cf27cfc24badc0b18da8f (diff)
UpstreamSource: move version guessing logic to PkgPolicy
PkgPolicy is more logical context, for example if guessing version from a plain filename and not a real file. Also, changes guess_version() to always return a tuple to simplify checking its return value. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Conflicts: gbp/pkg/__init__.py
Diffstat (limited to 'gbp/scripts')
-rw-r--r--gbp/scripts/import_orig.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gbp/scripts/import_orig.py b/gbp/scripts/import_orig.py
index f81d249..8eed96b 100644
--- a/gbp/scripts/import_orig.py
+++ b/gbp/scripts/import_orig.py
@@ -81,7 +81,7 @@ def upstream_import_commit_msg(options, version):
def detect_name_and_version(repo, source, options):
# Guess defaults for the package name and version from the
# original tarball.
- (guessed_package, guessed_version) = source.guess_version() or ('', '')
+ guessed_package, guessed_version = source.guess_version()
# Try to find the source package name
try: