[Rapier-commits] r189 - in trunk: debian src
This list send mail when a change occurs on the subversion repository
rapier-commits at garage.maemo.org
Tue Jan 15 18:51:27 EET 2008
Author: pamadio
Date: 2008-01-15 18:51:26 +0200 (Tue, 15 Jan 2008)
New Revision: 189
Modified:
trunk/debian/changelog
trunk/src/rapier
Log:
error checking
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2008-01-15 06:50:23 UTC (rev 188)
+++ trunk/debian/changelog 2008-01-15 16:51:26 UTC (rev 189)
@@ -4,6 +4,7 @@
* Icon is visible in the application manager.
* Removing modules did not worked properly.
* Strong Number support.
+ * Some error checking when copying directory in preferences.
-- Pierre Amadio <melmoth at localhost> Sat, 12 Jan 2008 11:33:38 +0100
Modified: trunk/src/rapier
===================================================================
--- trunk/src/rapier 2008-01-15 06:50:23 UTC (rev 188)
+++ trunk/src/rapier 2008-01-15 16:51:26 UTC (rev 189)
@@ -152,12 +152,18 @@
defdst="/home/user/sword"
src_uri=gnomevfs.URI("/usr/share/sword")
dst_uri=gnomevfs.URI(defdst)
- gnomevfs.xfer_uri_list([src_uri],[dst_uri],\
- gnomevfs.XFER_RECURSIVE,\
- gnomevfs.XFER_ERROR_MODE_ABORT,\
- gnomevfs.XFER_OVERWRITE_ACTION_REPLACE_ALL)
- self.gconf.set_string("/apps/osso/rapier/data_path",defdst)
+ try:
+ test=gnomevfs.xfer_uri_list([src_uri],[dst_uri],\
+ gnomevfs.XFER_RECURSIVE,\
+ gnomevfs.XFER_ERROR_MODE_ABORT,\
+ gnomevfs.XFER_OVERWRITE_ACTION_REPLACE_ALL)
+
+ self.gconf.set_string("/apps/osso/rapier/data_path",defdst)
+ except gnomevfs.Error,fault:
+ snt="Problem setting data_path to /usr/share/sword: %s"%fault
+ swordutils.debug(snt)
+ self.show_message(snt)
"""
First thing to do is to fill the menu with
@@ -749,12 +755,19 @@
swordutils.debug("Changing data path to %s"%self.prefSelectedSwordDataPath)
src_uri=gnomevfs.URI(self.mgr.prefixPath)
dst_uri=gnomevfs.URI(self.prefSelectedSwordDataPath)
- gnomevfs.xfer_uri_list([src_uri],[dst_uri],\
- gnomevfs.XFER_RECURSIVE,\
- gnomevfs.XFER_ERROR_MODE_ABORT,\
- gnomevfs.XFER_OVERWRITE_ACTION_REPLACE_ALL)
- self.gconf.set_string('/apps/osso/rapier/data_path',
- self.prefSelectedSwordDataPath)
+
+ try:
+ gnomevfs.xfer_uri_list([src_uri],[dst_uri],\
+ gnomevfs.XFER_RECURSIVE,\
+ gnomevfs.XFER_ERROR_MODE_ABORT,\
+ gnomevfs.XFER_OVERWRITE_ACTION_REPLACE_ALL)
+ self.gconf.set_string('/apps/osso/rapier/data_path',
+ self.prefSelectedSwordDataPath)
+ except gnomevfs.Error,fault:
+ snt="Problem changing data_path from %s to %s:\n%s"%\
+ (self.mgr.prefixPath,self.prefSelectedSwordDataPath,fault)
+ self.show_message(snt)
+ swordutils.debug(snt)
self.reload_manager()
#Debug
More information about the Rapier-commits
mailing list