Merge "diskfile: Add some argument validation"
This commit is contained in:
commit
f4df7c31df
@ -2284,6 +2284,10 @@ class BaseDiskFile(object):
|
|||||||
self._account = account
|
self._account = account
|
||||||
self._container = container
|
self._container = container
|
||||||
self._obj = obj
|
self._obj = obj
|
||||||
|
elif account or container or obj:
|
||||||
|
raise ValueError(
|
||||||
|
'Received a/c/o args %r, %r, and %r. Either none or all must '
|
||||||
|
'be provided.' % (account, container, obj))
|
||||||
else:
|
else:
|
||||||
# gets populated when we read the metadata
|
# gets populated when we read the metadata
|
||||||
self._name = None
|
self._name = None
|
||||||
|
Loading…
Reference in New Issue
Block a user