openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #13724
[Merge] lp:~smpettit/openlp/bug-905040 into lp:openlp
Stevan Pettit has proposed merging lp:~smpettit/openlp/bug-905040 into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
Bug #905040 in OpenLP: "Traceback when saving service to removed media"
https://bugs.launchpad.net/openlp/+bug/905040
For more details, see:
https://code.launchpad.net/~smpettit/openlp/bug-905040/+merge/87205
Added "try" statement when saving a service.
If the save location is unavailable, the "Save As" dialog is used.
Added "return" as suggested. Tested and works fine. Amazing the flexibility of Python.
--
https://code.launchpad.net/~smpettit/openlp/bug-905040/+merge/87205
Your team OpenLP Core is requested to review the proposed merge of lp:~smpettit/openlp/bug-905040 into lp:openlp.
=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py 2011-12-27 10:33:55 +0000
+++ openlp/core/ui/servicemanager.py 2012-01-01 13:53:23 +0000
@@ -595,7 +595,10 @@
self.mainwindow.finishedProgressBar()
Receiver.send_message(u'cursor_normal')
if success:
- shutil.copy(temp_file_name, path_file_name)
+ try:
+ shutil.copy(temp_file_name, path_file_name)
+ except:
+ return self.saveFileAs()
self.mainwindow.addRecentFile(path_file_name)
self.setModified(False)
try:
Follow ups