[Greater-commits] r266 - trunk/GREAT-ER-DB/impl/postgresql/test

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Jun 24 12:53:59 CEST 2011


Author: bricks
Date: 2011-06-24 12:53:59 +0200 (Fri, 24 Jun 2011)
New Revision: 266

Modified:
   trunk/GREAT-ER-DB/impl/postgresql/test/postgressupport.py
Log:
Don't user shell=True in Popen because the it's expecting a string
instead of a list.
Set the path to the unix domain socket also while starting the database server.


Modified: trunk/GREAT-ER-DB/impl/postgresql/test/postgressupport.py
===================================================================
--- trunk/GREAT-ER-DB/impl/postgresql/test/postgressupport.py	2011-06-24 10:51:57 UTC (rev 265)
+++ trunk/GREAT-ER-DB/impl/postgresql/test/postgressupport.py	2011-06-24 10:53:59 UTC (rev 266)
@@ -53,7 +53,7 @@
     are ignored and not written to any file.
     """
 #    print "Executing: \n%s" % " ".join(command)
-    proc = Popen(command, shell=True, env=os.environ,
+    proc = Popen(command, env=os.environ,
                  stdin=PIPE, stdout=PIPE, stderr=PIPE)
     output = proc.communicate()
     status = proc.returncode
@@ -153,7 +153,7 @@
         run_command(["initdb", "-D", self.dbdir, "-U", self.admin_name],
                     os.path.join(self.dbdir, "initdb.log"))
 
-        extra_opts = "-p%d " % self.port
+        extra_opts = "-p%d -k %s" % (self.port, self.host)
         # option -i removed
      #   if self.socket_dir is not None:
      #       extra_opts += " -k %s" % self.socket_dir



More information about the Greater-commits mailing list