Merge "diskfile: Add some argument validation"

This commit is contained in:
Zuul 2019-09-05 05:41:48 +00:00 committed by Gerrit Code Review
commit f4df7c31df

View File

@ -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