make sure postgis test does not run on windows if no server is availabl
This commit is contained in:
parent
f4ba1eba15
commit
cfe79a6fe3
2 changed files with 8 additions and 2 deletions
|
@ -31,7 +31,10 @@ 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.lower() or 'could not connect' in stderr.lower():
|
||||
elif not silent and 'error' in stderr.lower() \
|
||||
or 'could not connect' in stderr.lower() \
|
||||
or 'bad connection' in stderr.lower() \
|
||||
or 'not recognized as an internal' in stderr.lower():
|
||||
raise RuntimeError(stderr.strip())
|
||||
|
||||
def psql_can_connect():
|
||||
|
|
|
@ -23,7 +23,10 @@ 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.lower() or 'could not connect' in stderr.lower():
|
||||
elif not silent and 'error' in stderr.lower() \
|
||||
or 'could not connect' in stderr.lower() \
|
||||
or 'bad connection' in stderr.lower() \
|
||||
or 'not recognized as an internal' in stderr.lower():
|
||||
raise RuntimeError(stderr.strip())
|
||||
|
||||
def psql_can_connect():
|
||||
|
|
Loading…
Add table
Reference in a new issue