[csw-devel] SF.net SVN: gar:[20115] csw/mgar/gar/v2/lib/python/sharedlib_utils.py
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Sun Jan 13 18:40:13 CET 2013
Revision: 20115
http://gar.svn.sourceforge.net/gar/?rev=20115&view=rev
Author: wahwah
Date: 2013-01-13 17:40:12 +0000 (Sun, 13 Jan 2013)
Log Message:
-----------
checkpkg: Fix for exception raising for mime
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/sharedlib_utils.py
Modified: csw/mgar/gar/v2/lib/python/sharedlib_utils.py
===================================================================
--- csw/mgar/gar/v2/lib/python/sharedlib_utils.py 2013-01-13 17:39:44 UTC (rev 20114)
+++ csw/mgar/gar/v2/lib/python/sharedlib_utils.py 2013-01-13 17:40:12 UTC (rev 20115)
@@ -6,7 +6,12 @@
import os.path
import common_constants
+class Error(Exception):
+ """Generic error."""
+class DataError(Error):
+ """There's a problem with data."""
+
# TODO: Merge with common_constants
SPARCV8_PATHS = (
'sparcv8',
@@ -234,7 +239,7 @@
if not file_info["mime_type"]:
# This should never happen, but it seems to have happened at least once.
# TODO: Find the affected data and figure out why.
- raise PackageError("file_info is missing mime_type:" % file_info)
+ raise DataError("file_info is missing mime_type:" % file_info)
for mimetype in BIN_MIMETYPES:
if mimetype in file_info["mime_type"]:
is_a_binary = True
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