GbpError accepts an error message
authorGuido Günther <agx@sigxcpu.org>
Thu, 8 Nov 2012 21:20:26 +0000 (22:20 +0100)
committerGuido Günther <agx@sigxcpu.org>
Thu, 8 Nov 2012 22:26:30 +0000 (23:26 +0100)
so no need to print it separately

gbp/scripts/import_orig.py

index 046f47d..35e8f6f 100644 (file)
@@ -265,8 +265,7 @@ def main(argv):
         is_empty = False if initial_branch else True
 
         if not repo.has_branch(options.upstream_branch) and not is_empty:
-            gbp.log.err(no_upstream_branch_msg % options.upstream_branch)
-            raise GbpError
+            raise GbpError(no_upstream_branch_msg % options.upstream_branch)
 
         (sourcepackage, version) = detect_name_and_version(repo, source, options)