summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b7f30e0)
raw | patch | inline | side by side (parent: b7f30e0)
author | Anton Gyllenberg <anton@iki.fi> | |
Mon, 19 Nov 2007 10:37:16 +0000 (12:37 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 20 Nov 2007 07:24:34 +0000 (23:24 -0800) |
Importing both gtksourceview and gtksourceview2 will make python segfault
on my system (ubuntu 7.10). Change so that gtksourceview is only imported
if importing gtksourceview2 fails. This should be safe as gtksourceview
is only used if gtksourceview2 is not available.
Signed-off-by: Anton Gyllenberg <anton@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
on my system (ubuntu 7.10). Change so that gtksourceview is only imported
if importing gtksourceview2 fails. This should be safe as gtksourceview
is only used if gtksourceview2 is not available.
Signed-off-by: Anton Gyllenberg <anton@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/gitview/gitview | patch | blob | history |
index 449ee69bf48d41424e058b7bc61fd8ccc69c341d..4c99dfb9038ca034d86b72cbe342373d12ae8cc6 100755 (executable)
--- a/contrib/gitview/gitview
+++ b/contrib/gitview/gitview
import string
import fcntl
+have_gtksourceview2 = False
+have_gtksourceview = False
try:
import gtksourceview2
have_gtksourceview2 = True
except ImportError:
- have_gtksourceview2 = False
-
-try:
- import gtksourceview
- have_gtksourceview = True
-except ImportError:
- have_gtksourceview = False
-
-if not have_gtksourceview2 and not have_gtksourceview:
- print "Running without gtksourceview2 or gtksourceview module"
+ try:
+ import gtksourceview
+ have_gtksourceview = True
+ except ImportError:
+ print "Running without gtksourceview2 or gtksourceview module"
re_ident = re.compile('(author|committer) (?P<ident>.*) (?P<epoch>\d+) (?P<tz>[+-]\d{4})')