s4-s3upgrade: Add my wins.dat and fix the parsing error
[samba.git] / source4 / scripting / python / samba / samba3 / __init__.py
index dd2f927aa4ae3bbad98e8d44ca13b2b942032d26..14db90ac51a085df8ffb7b83edbc902843ab3071 100644 (file)
@@ -53,12 +53,9 @@ class TdbDatabase(object):
     def __init__(self, file):
         """Open a file.
 
-        :param file: Path of the file to open (appending "2" if TDB2 enabled).
+        :param file: Path of the file to open.
         """
-        if tdb.__version__.startswith("2"):
-            self.tdb = tdb.Tdb(file + "2", flags=os.O_RDONLY)
-        else:
-            self.tdb = tdb.Tdb(file, flags=os.O_RDONLY)
+        self.tdb = tdb.Tdb(file, flags=os.O_RDONLY)
         self._check_version()
 
     def _check_version(self):
@@ -307,7 +304,8 @@ def shellsplit(text):
         if c == "\"":
             inquotes = not inquotes
         elif c in ("\t", "\n", " ") and not inquotes:
-            ret.append(current)
+            if current != "":
+                ret.append(current)
             current = ""
         else:
             current += c