[csw-devel] SF.net SVN: gar:[14678] csw/mgar/gar/v2/lib/python/pkgdb.py
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Tue May 31 09:52:32 CEST 2011
Revision: 14678
http://gar.svn.sourceforge.net/gar/?rev=14678&view=rev
Author: wahwah
Date: 2011-05-31 07:52:32 +0000 (Tue, 31 May 2011)
Log Message:
-----------
pkgdb: Don't display the backtrace
Don't display the backtrace when database problems occur.
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/pkgdb.py
Modified: csw/mgar/gar/v2/lib/python/pkgdb.py
===================================================================
--- csw/mgar/gar/v2/lib/python/pkgdb.py 2011-05-31 07:50:10 UTC (rev 14677)
+++ csw/mgar/gar/v2/lib/python/pkgdb.py 2011-05-31 07:52:32 UTC (rev 14678)
@@ -451,7 +451,12 @@
"Importing %s, %s",
stats["basic_stats"]["md5_sum"],
stats["basic_stats"]["pkg_basename"])
- package_stats.PackageStats.ImportPkg(stats, options.replace)
+ try:
+ package_stats.PackageStats.ImportPkg(stats, options.replace)
+ except sqlobject.dberrors.OperationalError, e:
+ logging.fatal(
+ "A problem when importing package data has occurred: %s", e)
+ sys.exit(1)
elif command == 'removepkg':
for md5_sum in md5_sums:
srv4 = GetPkg(md5_sum)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list