Kaydet (Commit) 39e19c18 authored tarafından Heewa Barfchin's avatar Heewa Barfchin

Catch invalid path in build method

The server responds with an unuseful message (server error EOF), which
happens because an empty tar file is sent over. So check in the client,
who knows why that's happening and tell the user.
üst 7a462970
......@@ -395,6 +395,8 @@ class Client(requests.Session):
elif path.startswith(('http://', 'https://',
'git://', 'github.com/')):
remote = path
elif not os.path.isdir(path):
raise TypeError("You must specify a directory to build in path")
else:
dockerignore = os.path.join(path, '.dockerignore')
exclude = None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment