Skip to content

Commit 7b1cc2c

Browse files
committed
Catch requests.exceptions.ConnectionError and return human freindly message.
1 parent 8cdba92 commit 7b1cc2c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

client/deis.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2028,6 +2028,10 @@ def main():
20282028
# dispatch the CLI command
20292029
try:
20302030
method(args)
2031+
except requests.exceptions.ConnectionError as err:
2032+
print("Couldn't connect to the Deis Controller. Make sure that the Controller URI is \
2033+
correct and the server is running.")
2034+
sys.exit(1)
20312035
except EnvironmentError as err:
20322036
raise DocoptExit(err.message)
20332037
except ResponseError as err:

0 commit comments

Comments
 (0)