[beast] DoxiParser.py: improved debugging for git_author_date case
- From: Tim Janik <timj src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [beast] DoxiParser.py: improved debugging for git_author_date case
- Date: Tue, 6 Oct 2009 23:12:40 +0000 (UTC)
commit 09adc0e9756470fbb9d3a78ba0d74ddda8133d36
Author: Tim Janik <timj gtk org>
Date: Wed Oct 7 01:11:57 2009 +0200
DoxiParser.py: improved debugging for git_author_date case
doxer/DoxiParser.py | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/doxer/DoxiParser.py b/doxer/DoxiParser.py
index e0dd4a9..bd8665c 100644
--- a/doxer/DoxiParser.py
+++ b/doxer/DoxiParser.py
@@ -368,14 +368,17 @@ def doxer_setget (macro, env_variables = None):
import os, subprocess
sfile = env_variables['source-file'] # absolute
sfile = os.path.split (sfile) # (dir, file)
+ pcmd = ['git', 'log', '-n1', '--pretty=format:%ai', '--', sfile[1]]
try:
- p1 = subprocess.Popen (['git-log', '-n1', '--pretty=format:%aD', sfile[1]], cwd = sfile[0],
- stdout = subprocess.PIPE, stderr = open ('/dev/null', 'w'))
+ p1 = subprocess.Popen (pcmd, cwd = sfile[0], stdout = subprocess.PIPE, stderr = open ('/dev/null', 'w'))
+ except Exception, ex:
+ debug ("exec failed: %s: %s" % (" ".join (pcmd), ex))
+ p1 = None
+ if p1:
val_unstripped = p1.stdout.readline()
p1.stdout.close()
if 0 == p1.wait(): # reap and check success
val = val_unstripped.strip()
- except: pass
if macro.name == 'doxer_add':
head = env_variables.get (name)
env_variables[name] = (head and head or ()) + (val,)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]