Browse Source

Merge "diskfile: Add some argument validation"

tags/2.23.0
Zuul 2 months ago
parent
commit
f4df7c31df
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      swift/obj/diskfile.py

+ 4
- 0
swift/obj/diskfile.py View File

@@ -2284,6 +2284,10 @@ class BaseDiskFile(object):
self._account = account
self._container = container
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:
# gets populated when we read the metadata
self._name = None

Loading…
Cancel
Save