[gedit-plugins] git: Fix bug when file is not in git
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-plugins] git: Fix bug when file is not in git
- Date: Tue, 19 May 2015 13:38:20 +0000 (UTC)
commit 6b11b798708e7d40437128c21a141f5e470ce8f5
Author: Garrett Regier <garrettregier gmail com>
Date: Tue May 19 06:37:52 2015 -0700
git: Fix bug when file is not in git
A node is only inserted when a git repo
could be found.
plugins/git/git/windowactivatable.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/plugins/git/git/windowactivatable.py b/plugins/git/git/windowactivatable.py
index 676b61b..c922e63 100644
--- a/plugins/git/git/windowactivatable.py
+++ b/plugins/git/git/windowactivatable.py
@@ -315,7 +315,11 @@ class GitWindowActivatable(GObject.Object, Gedit.WindowActivatable):
del self.monitors[uri]
else:
- del self.file_nodes[location]
+ try:
+ del self.file_nodes[location]
+
+ except KeyError:
+ pass
def update_location(self, result):
location, status = result
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]