fix pgraster/postgis logic to skip tests if there is no postgres server running
This commit is contained in:
parent
17e1061536
commit
0d47deb169
2 changed files with 2 additions and 2 deletions
|
@ -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():
|
||||
|
|
|
@ -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():
|
||||
|
|
Loading…
Reference in a new issue