diff options
author | Aanand Prasad <aanand.prasad@gmail.com> | 2016-03-16 14:54:32 +0000 |
---|---|---|
committer | Aanand Prasad <aanand.prasad@gmail.com> | 2016-03-16 14:54:32 +0000 |
commit | 07455a6a3c92b2c642d340b3356a20c386ad97dc (patch) | |
tree | 711216320e3a26a571549c130dd28059851fdb21 | |
parent | 88ef5f36304d6d6add239e4e0dc60f41bcbf0fcc (diff) | |
download | docker-py-07455a6a3c92b2c642d340b3356a20c386ad97dc.tar.gz |
Clarify error messages when bad values are passed in for tmpfs
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
-rw-r--r-- | docker/utils/utils.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/docker/utils/utils.py b/docker/utils/utils.py index a9cd5b7..04a09a9 100644 --- a/docker/utils/utils.py +++ b/docker/utils/utils.py @@ -343,7 +343,8 @@ def convert_tmpfs_mounts(tmpfs): if not isinstance(tmpfs, list): raise ValueError( - 'Tmpfs spec must be a list' + 'Expected tmpfs value to be either a list or a dict, found: {}' + .format(type(tmpfs).__name__) ) result = {} @@ -357,7 +358,8 @@ def convert_tmpfs_mounts(tmpfs): else: raise ValueError( - "Tmpfs spec have to be str, unicode or tuple" + "Expected item in tmpfs list to be a string, found: {}" + .format(type(mount).__name__) ) result[name] = options |