From 2470fb92e9be7142d3c1a258b35e400cae478b36 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 10 Sep 2010 10:11:09 -0500 Subject: Remove SomethingFishyException Just use a plain Exception instead since we don't get any added value by subclassing. Signed-off-by: Dan McGee --- devel/management/commands/reporead.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py index ee0c50fb..a56fe929 100644 --- a/devel/management/commands/reporead.py +++ b/devel/management/commands/reporead.py @@ -39,11 +39,6 @@ from main.models import Arch, Package, Repo -class SomethingFishyException(Exception): - '''Raised when the database looks like its going to wipe out a bunch of - packages.''' - pass - logging.basicConfig( level=WARNING, format='%(asctime)s -> %(levelname)s: %(message)s', @@ -291,7 +286,7 @@ def db_update(archname, reponame, pkgs, options): logger.info("DB package ratio: %.1f%%" % dbpercent) if dbpercent < 50.0 and not repository.testing: logger.error(".db.tar.gz has %.1f%% the number of packages in the web database" % dbpercent) - raise SomethingFishyException( + raise Exception( 'It looks like the syncdb is less than half the size of the web db. WTF?') if dbpercent < 75.0: @@ -388,7 +383,7 @@ def parse_repo(repopath): reponame = m.group(1) else: logger.error("File does not have the proper extension") - raise SomethingFishyException("File does not have the proper extension") + raise Exception("File does not have the proper extension") repodb = tarfile.open(repopath,"r:gz") ## assuming well formed tar, with dir first then files after -- cgit v1.2.3-54-g00ecf