We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 237ce20 commit c2d98c2Copy full SHA for c2d98c2
docker/utils/decorators.py
@@ -4,19 +4,18 @@
4
5
6
def check_resource(f):
7
-
8
@functools.wraps(f)
9
def wrapped(self, resource_id=None, *args, **kwargs):
10
if resource_id is None:
11
if kwargs.get('container'):
12
resource_id = kwargs.pop('container')
13
elif kwargs.get('image'):
14
resource_id = kwargs.pop('image')
15
- if isinstance(resource_id, dict):
16
- resource_id = resource_id.get('Id')
17
if not resource_id:
18
raise errors.NullResource(
19
'image or container param is undefined'
20
)
+ if isinstance(resource_id, dict):
+ resource_id = resource_id.get('Id')
21
return f(self, resource_id, *args, **kwargs)
22
return wrapped
0 commit comments