From 3c94ee53d7ddf83f02acd08e64973c5aa6db91f2 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Mon, 30 Mar 2009 23:50:12 +0200 Subject: Fix a bug in docBar when document is untitled. Signed-off-by: Matthieu Gautier --- g-ed-it/docBar.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/g-ed-it/docBar.py b/g-ed-it/docBar.py index aaf4eaf..cf16265 100644 --- a/g-ed-it/docBar.py +++ b/g-ed-it/docBar.py @@ -71,16 +71,17 @@ class DocBar (object): self.toBeKilled = False; self.other = False; - statusStr = subprocess.Popen(["git-ls-files","--exclude-standard","-m","-c","-d","-o","-v",os.path.basename(uri)],stdout=subprocess.PIPE,cwd=cwd).communicate()[0] - statusLines = statusStr.split("\n") - for statusLine in statusLines[:-1]: - status = statusLine.split()[0] - if status == "H": self.cached = True - if status == "M": self.unmerged = True - if status == "R": self.deleted = True - if status == "C": self.changed = True - if status == "K": self.toBeKilled = True - if status == "?": self.other = True + if not self.doc.is_untitled(): + statusStr = subprocess.Popen(["git-ls-files","--exclude-standard","-m","-c","-d","-o","-v",os.path.basename(uri)],stdout=subprocess.PIPE,cwd=cwd).communicate()[0] + statusLines = statusStr.split("\n") + for statusLine in statusLines[:-1]: + status = statusLine.split()[0] + if status == "H": self.cached = True + if status == "M": self.unmerged = True + if status == "R": self.deleted = True + if status == "C": self.changed = True + if status == "K": self.toBeKilled = True + if status == "?": self.other = True self.setDocInfo() pass -- cgit