mirror of https://github.com/docker/docker-py.git
Merge branch 'use-wraps' of https://github.com/ssanderson/docker-py into ssanderson-use-wraps
This commit is contained in:
commit
cd5c8c593a
|
|
@ -1,7 +1,10 @@
|
||||||
|
from functools import wraps
|
||||||
from .. import errors
|
from .. import errors
|
||||||
|
|
||||||
|
|
||||||
def check_resource(f):
|
def check_resource(f):
|
||||||
|
|
||||||
|
@wraps(f)
|
||||||
def wrapped(self, resource_id=None, *args, **kwargs):
|
def wrapped(self, resource_id=None, *args, **kwargs):
|
||||||
if resource_id is None:
|
if resource_id is None:
|
||||||
if kwargs.get('container'):
|
if kwargs.get('container'):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue