Add ; to commands strings specified via -c
authorMartin Pihlak <martin.pihlak@gmail.com>
Wed, 15 Apr 2009 13:29:43 +0000 (16:29 +0300)
committerMartin Pihlak <martin.pihlak@gmail.com>
Wed, 15 Apr 2009 13:29:43 +0000 (16:29 +0300)
python/newadm.py

index 46b2ddaed350e992078f4d95aa07f8d0b4e04e80..5bd503b4b360c7fb1075efc8c82bc63d63fcd3ab 100755 (executable)
@@ -518,6 +518,10 @@ class AdminConsole:
             print "cannot handle -c and -f together"
             sys.exit(1)
 
+        # append ; to cmd_str if needed
+        if self.cmd_str and not self.cmd_str.rstrip().endswith(';'):
+            self.cmd_str += ';'
+
         cmd_str = self.cmd_str
         if self.cmd_file:
             cmd_str = open(self.cmd_file, "r").read()