aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2011-07-25 20:56:10 +0200
committerGuido Günther <agx@sigxcpu.org>2011-07-25 21:13:16 +0200
commit33d5156335a6a602102d7387624e05729d46d5ff (patch)
tree1b9b41cce7abf53357958cdae1003c31e12f2d61
parent489a532b1e6a15d8d74dc4acc13f2b5296f26b03 (diff)
Catch empty package names
This can happen in empty repositories when importing non tarball upstream source. Git-Dch: Ignore
-rwxr-xr-xgit-import-orig6
1 files changed, 4 insertions, 2 deletions
diff --git a/git-import-orig b/git-import-orig
index aebb811..08db897 100755
--- a/git-import-orig
+++ b/git-import-orig
@@ -319,7 +319,9 @@ def main(argv):
if options.interactive:
sourcepackage = ask_package_name(guessed_package)
else:
- sourcepackage = guessed_package
+ if guessed_package:
+ sourcepackage = guessed_package
+ raise GbpError, "Couldn't determine upstream package name. Use --interactive."
# Try to find the version.
if options.version:
@@ -331,7 +333,7 @@ def main(argv):
if guessed_version:
version = guessed_version
else:
- raise GbpError, "Couldn't determine upstream version. Use '-u<version>' or --interactive"
+ raise GbpError, "Couldn't determine upstream version. Use '-u<version>' or --interactive."
(clean, out) = repo.is_clean()
if not clean and not is_empty: