From 61f7f0155465b14612f7ac29a12c442ff25031b4 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 16 Jun 2012 13:58:06 +1000 Subject: [PATCH] s4-s3upgrade: Add my wins.dat and fix the parsing error The issue was that the numbers at the end of the lines are space padded. Andrew Bartlett --- source4/scripting/python/samba/samba3/__init__.py | 3 ++- source4/setup/tests/blackbox_s3upgrade.sh | 2 ++ testdata/samba3/wins.dat2 | 23 +++++++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 testdata/samba3/wins.dat2 diff --git a/source4/scripting/python/samba/samba3/__init__.py b/source4/scripting/python/samba/samba3/__init__.py index a955be1a735..14db90ac51a 100644 --- a/source4/scripting/python/samba/samba3/__init__.py +++ b/source4/scripting/python/samba/samba3/__init__.py @@ -304,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 diff --git a/source4/setup/tests/blackbox_s3upgrade.sh b/source4/setup/tests/blackbox_s3upgrade.sh index d8f5d8fced8..d968129ea1e 100755 --- a/source4/setup/tests/blackbox_s3upgrade.sh +++ b/source4/setup/tests/blackbox_s3upgrade.sh @@ -61,6 +61,8 @@ cat - > $PREFIX/samba3-upgrade/samba3/smb2.conf <