]> Savannah Git Hosting - gnulib.git/commitdiff
filesystem: move git directory check below
authorDmitry Selyutin <ghostmansd@gmail.com>
Fri, 8 Sep 2017 07:36:22 +0000 (10:36 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Fri, 8 Sep 2017 07:36:22 +0000 (10:36 +0300)
pygnulib/filesystem.py

index 0381d67c6aff9cf935befff147ec1c56a14547c9..3d5721ff301649f6d75ba2f1ccb9a688038c1e0e 100644 (file)
@@ -82,9 +82,9 @@ class Git(Directory):
     def __init__(self, root, config):
         if not os.path.isdir(root):
             raise FileNotFoundError(root)
-        if not os.path.isdir(os.path.join(root, ".git")):
-            raise TypeError("%r is not a gnulib repository")
         super().__init__(root, config)
+        if not os.path.isdir(os.path.join(self._root_, ".git")):
+            raise TypeError("%r is not a gnulib repository")
 
 
     def module(self, name, full=True):