reporead: don't print full backtrace if unnecessary

In the architecture agnostic case, this error is much more likely to
happen, so printing it like an error message is deceiving.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2012-10-12 11:39:16 -05:00
parent a71aa2e354
commit 5228cb5f58

View File

@ -393,9 +393,12 @@ def db_update(archname, reponame, pkgs, force=False):
populate_pkg(dbpkg, pkg, timestamp=now())
Update.objects.log_update(None, dbpkg)
except IntegrityError:
logger.warning("Could not add package %s; "
"not fatal if another thread beat us to it.",
pkg.name, exc_info=True)
if architecture.agnostic:
logger.warning("Could not add package %s; "
"not fatal if another thread beat us to it.",
pkg.name)
else:
logger.exception("Could not add package %s", pkg.name)
# packages in database and not in syncdb (remove from database)
for pkgname in (dbset - syncset):