summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-09-10 10:11:09 -0500
committerDan McGee <dan@archlinux.org>2010-09-10 10:11:14 -0500
commit2470fb92e9be7142d3c1a258b35e400cae478b36 (patch)
treec01be851f13cfbc3af424b9cf91f3573f9ac27f2
parenteaa76ae7584d0938db0298714303e2c23b3eacfd (diff)
Remove SomethingFishyException
Just use a plain Exception instead since we don't get any added value by subclassing. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--devel/management/commands/reporead.py9
1 files 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 logging import ERROR, WARNING, INFO, DEBUG
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