[meld] More error dialog usage in dirdiff
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] More error dialog usage in dirdiff
- Date: Fri, 27 Sep 2013 22:05:07 +0000 (UTC)
commit fd05f5de3b8792dda22b51b3ef2cc90d45326773
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Aug 17 14:58:33 2013 +1000
More error dialog usage in dirdiff
meld/dirdiff.py | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/meld/dirdiff.py b/meld/dirdiff.py
index 63d32e7..7d6139e 100644
--- a/meld/dirdiff.py
+++ b/meld/dirdiff.py
@@ -27,6 +27,7 @@ import stat
import sys
import time
+import gobject
import gtk
import gtk.keysyms
@@ -840,8 +841,15 @@ class DirDiff(melddoc.MeldDoc, gnomeglade.Component):
continue
misc.copytree(src, dst)
self.recursively_update( path )
- except (OSError, IOError) as e:
- misc.run_dialog(_("Error copying '%s' to '%s'\n\n%s.") % (src, dst,e), self)
+ except (OSError, IOError, shutil.Error) as err:
+ misc.error_dialog(
+ _("Error copying file"),
+ _("Couldn't copy %s\nto %s.\n\n%s") % (
+ gobject.markup_escape_text(src),
+ gobject.markup_escape_text(dst),
+ gobject.markup_escape_text(str(err)),
+ )
+ )
def delete_selected(self):
"""Delete all selected files/folders recursively.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]