fix pgraster/postgis logic to skip tests if there is no postgres server running

This commit is contained in:
Dane Springmeyer 2014-08-13 09:04:54 -07:00
parent 17e1061536
commit 0d47deb169
2 changed files with 2 additions and 2 deletions

View file

@ -31,7 +31,7 @@ def call(cmd,silent=False):
stdin, stderr = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE).communicate()
if not stderr:
return stdin.strip()
elif not silent and 'ERROR' in stderr:
elif not silent and 'error' in stderr.lower() or 'could not connect' in stderr.lower():
raise RuntimeError(stderr.strip())
def psql_can_connect():

View file

@ -23,7 +23,7 @@ def call(cmd,silent=False):
stdin, stderr = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE).communicate()
if not stderr:
return stdin.strip()
elif not silent and not 'NOTICE' in stderr:
elif not silent and 'error' in stderr.lower() or 'could not connect' in stderr.lower():
raise RuntimeError(stderr.strip())
def psql_can_connect():