]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
vfs: use "root" argument instead of "gnulib"
authorDmitry Selyutin <ghostmansd@gmail.com>
Wed, 4 Oct 2017 20:26:22 +0000 (23:26 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Thu, 5 Oct 2017 07:03:21 +0000 (10:03 +0300)
pygnulib/vfs.py

index 85d2c8342a32bae4b4cac6997f302f2204f018b4..abc5958c58b9aa707dba9027b7260dff6802fbf5 100644 (file)
@@ -162,24 +162,22 @@ class GnulibGit(Base):
 
 
 
-def lookup(name, root, gnulib, local, patch="patch"):
+def lookup(name, root, local, patch="patch"):
     """
     Look up a file inside base VFS or local VFS, or combine it using patch.
     If file is available or can be generated via patching, return a readable stream.
     Note that this file may not be the original
     """
-    _type_assert_("root", root, str)
-    _type_assert_("gnulib", gnulib, Base)
+    _type_assert_("root", root, Base)
     _type_assert_("local", local, Base)
     _type_assert_("patch", patch, str)
     if name in local:
         return _codecs_.open(local[name], "rb")
     diff = "{}.diff".format(name)
     if diff not in local:
-        return _codecs_.open(gnulib[name], "rb")
-
+        return _codecs_.open(root[name], "rb")
     tmp = _tempfile_.NamedTemporaryFile(mode="w+b", delete=False)
-    with _codecs_.open(gnulib[name], "rb") as stream:
+    with _codecs_.open(root[name], "rb") as stream:
         _shutil_.copyfileobj(stream, tmp)
         tmp.close()
     stdin = _codecs_.open(local[diff], "rb")