[gedit-plugins] git: Add a debug message if we fail to monitor a directory
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-plugins] git: Add a debug message if we fail to monitor a directory
- Date: Fri, 22 Aug 2014 16:44:26 +0000 (UTC)
commit 039e2cf9345e7b6aaf4dd5107f2abdac4f943546
Author: Garrett Regier <garrettregier gmail com>
Date: Sun Aug 17 18:41:09 2014 -0700
git: Add a debug message if we fail to monitor a directory
Also, only catch GLib.Error, not all exceptions as it could cause
an exception like SystemExit to be ignored.
plugins/git/git/windowactivatable.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/plugins/git/git/windowactivatable.py b/plugins/git/git/windowactivatable.py
index 3fa99ca..6f6767d 100644
--- a/plugins/git/git/windowactivatable.py
+++ b/plugins/git/git/windowactivatable.py
@@ -306,7 +306,10 @@ class GitWindowActivatable(GObject.Object, Gedit.WindowActivatable):
def monitor_directory(self, location):
try:
monitor = location.monitor(Gio.FileMonitorFlags.NONE, None)
- except:
+
+ except GLib.Error as e:
+ debug('Failed to monitor directory "%s": %s' %
+ (location.get_uri(), e))
return
self.monitors[location.get_uri()] = monitor
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]