hooks: allow customizing where the hook directory is
[gitweb.git] / contrib / gitview / gitview
index 449ee69bf48d41424e058b7bc61fd8ccc69c341d..4e23c650fe6341737fa8fb36070ce7999ba1f54b 100755 (executable)
@@ -27,20 +27,17 @@ import math
 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})')
 
@@ -1208,7 +1205,7 @@ class GitView(object):
 
                #The first parent always continue on the same line
                try:
-                       # check we alreay have the value
+                       # check we already have the value
                        tmp_node_pos = self.nodepos[commit.parent_sha1[0]]
                except KeyError:
                        self.colours[commit.parent_sha1[0]] = colour