Merge pull request #337 from heewa/catch_invalid_build

Catch invalid path in build method
This commit is contained in:
Joffrey F 2014-10-22 19:23:46 +02:00
commit b93fca639e
1 changed files with 2 additions and 0 deletions

View File

@ -406,6 +406,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