Skip to content

Commit 07455a6

Browse files
committed
Clarify error messages when bad values are passed in for tmpfs
Signed-off-by: Aanand Prasad <[email protected]>
1 parent 88ef5f3 commit 07455a6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docker/utils/utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,8 @@ def convert_tmpfs_mounts(tmpfs):
343343

344344
if not isinstance(tmpfs, list):
345345
raise ValueError(
346-
'Tmpfs spec must be a list'
346+
'Expected tmpfs value to be either a list or a dict, found: {}'
347+
.format(type(tmpfs).__name__)
347348
)
348349

349350
result = {}
@@ -357,7 +358,8 @@ def convert_tmpfs_mounts(tmpfs):
357358

358359
else:
359360
raise ValueError(
360-
"Tmpfs spec have to be str, unicode or tuple"
361+
"Expected item in tmpfs list to be a string, found: {}"
362+
.format(type(mount).__name__)
361363
)
362364

363365
result[name] = options

0 commit comments

Comments
 (0)