From 3678906db10415e1ff690c0fc9baba1fe1af1d97 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Thu, 8 Nov 2012 18:45:01 +0200 Subject: import-orig: remove dead GbpNothingImported exception Signed-off-by: Markus Lehtonen --- gbp/errors.py | 5 ----- gbp/scripts/import_orig.py | 6 +----- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/gbp/errors.py b/gbp/errors.py index 1d9e8846..fd894046 100644 --- a/gbp/errors.py +++ b/gbp/errors.py @@ -20,9 +20,4 @@ class GbpError(Exception): """Generic exception raised in git-buildpackage commands""" pass -class GbpNothingImported(GbpError): - msg = "Nothing to commit, nothing imported." - def __str__(self): - return self.msg - # vim:et:ts=4:sw=4:et:sts=4:ai:set list listchars=tab\:»·,trail\:·: diff --git a/gbp/scripts/import_orig.py b/gbp/scripts/import_orig.py index 19b49579..cb3bf026 100644 --- a/gbp/scripts/import_orig.py +++ b/gbp/scripts/import_orig.py @@ -27,7 +27,7 @@ from gbp.deb.uscan import (Uscan, UscanError) from gbp.deb.changelog import ChangeLog, NoChangeLogError from gbp.deb.git import (GitRepositoryError, DebianGitRepository) from gbp.config import GbpOptionParserDebian, GbpOptionGroup, no_upstream_branch_msg -from gbp.errors import (GbpError, GbpNothingImported) +from gbp.errors import GbpError import gbp.log from gbp.scripts.common.import_orig import (OrigUpstreamSource, cleanup_tmp_tree, ask_package_name, ask_package_version, @@ -357,10 +357,6 @@ def main(argv): gbpc.Command(options.postimport % info, extra_env=env, shell=True)() except (gbpc.CommandExecFailed, GitRepositoryError): raise GbpError("Import of %s failed" % source.path) - except GbpNothingImported as err: - gbp.log.err(err) - repo.set_branch(initial_branch) - ret = 1 except GbpError as err: if len(err.__str__()): gbp.log.err(err) -- cgit v1.2.3