Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/jarabe/journal/volumestoolbar.py
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2010-08-31 14:44:53 (GMT)
committer Simon Schampijer <simon@schampijer.de>2010-08-31 14:44:53 (GMT)
commit46f194c0e9d8a053d41869e18d3d237423c6832c (patch)
tree04c8924434051026250d778e2912d89a303520e7 /src/jarabe/journal/volumestoolbar.py
parentc5ac2887e7cb121645747d339f7b34dc8d673992 (diff)
Journal: Alert if an error occures when copying to devices in the detail view #1842
Includes better error messages for both cases (detail view and dragging in main view).
Diffstat (limited to 'src/jarabe/journal/volumestoolbar.py')
-rw-r--r--src/jarabe/journal/volumestoolbar.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/jarabe/journal/volumestoolbar.py b/src/jarabe/journal/volumestoolbar.py
index 8b7786f..4208c17 100644
--- a/src/jarabe/journal/volumestoolbar.py
+++ b/src/jarabe/journal/volumestoolbar.py
@@ -153,17 +153,19 @@ class BaseButton(RadioToolButton):
metadata = model.get(object_id)
file_path = model.get_file(metadata['uid'])
if not file_path or not os.path.exists(file_path):
- logging.warn('File does not exist')
- self.emit('volume-error', _('Entries without a file cannot'
- ' be copied'), _('Warning'))
+ logging.warn('Entries without a file cannot be copied.')
+ self.emit('volume-error',
+ _('Entries without a file cannot be copied.'),
+ _('Warning'))
return
try:
model.copy(metadata, self.mount_point)
- except IOError:
- logging.exception('BaseButton._drag_data_received_cb: Error'
- 'while copying')
- self.emit('volume-error', _('Input/Output error'), _('Error'))
+ except IOError, e:
+ logging.exception('Error while copying the entry. %s', e.strerror)
+ self.emit('volume-error',
+ _('Error while copying the entry. %s') % e.strerror,
+ _('Error'))
class VolumeButton(BaseButton):
def __init__(self, mount):