[Commits] (morgen) An error was being raised where it shouldn't
have been.
commits at osafoundation.org
commits at osafoundation.org
Mon Feb 7 13:53:01 PST 2005
Commit by: morgen
Modified files:
chandler/parcels/osaf/framework/sharing/Sharing.py 1.68 1.69
Log message:
An error was being raised where it shouldn't have been.
ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/framework/sharing/Sharing.py.diff?r1=text&tr1=1.68&r2=text&tr2=1.69
Index: chandler/parcels/osaf/framework/sharing/Sharing.py
diff -u chandler/parcels/osaf/framework/sharing/Sharing.py:1.68 chandler/parcels/osaf/framework/sharing/Sharing.py:1.69
--- chandler/parcels/osaf/framework/sharing/Sharing.py:1.68 Mon Feb 7 12:31:00 2005
+++ chandler/parcels/osaf/framework/sharing/Sharing.py Mon Feb 7 13:52:59 2005
@@ -1,5 +1,5 @@
-__version__ = "$Revision: 1.68 $"
-__date__ = "$Date: 2005/02/07 20:31:00 $"
+__version__ = "$Revision: 1.69 $"
+__date__ = "$Date: 2005/02/07 21:52:59 $"
__copyright__ = "Copyright (c) 2004 Open Source Applications Foundation"
__license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
@@ -203,9 +203,11 @@
self.__addToManifest(item, data, -1)
logger.info("...imported '%s' %s, data: %s" % \
(item.getItemDisplayName(), item, data))
- else:
- logger.info("...NOT able to import '%s'" % itemPath)
- return item
+ return item
+
+ logger.info("...NOT able to import '%s'" % itemPath)
+ msg = "Not able to import '%s'" % itemPath
+ raise SharingError(message=msg)
else:
pass
# logger.info("...skipping")
@@ -228,10 +230,6 @@
itemPath = self._getItemPath(self.share)
item = self.__conditionalGetItem(itemPath, into=self.share)
- if item is None:
- logger.info("...NOT able to import share")
- msg = "Not able to sync '%s'\nBad Format" % location
- raise SharingError(message=msg)
if item is not None:
retrievedItems.append(item)
@@ -903,6 +901,12 @@
def __init__(self, message=None):
self.message = message
+ def __str__(self):
+ try:
+ return "Sharing error '%s'" % self.message
+ except:
+ return "Sharing error"
+
class AlreadyExists(SharingError):
""" Exception raised if a share already exists. """
More information about the Commits
mailing list