diff options
author | Jun Li <matthew.lijun@huawei.com> | 2016-10-08 02:33:08 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2016-10-08 02:33:08 +0000 |
commit | 23f716997d7cc1f396007f5b2e3c4d82dc2e94a3 (patch) | |
tree | 33c968c9d88da2497be2b51969a456ffa88af843 /testsuites/vstf/vstf_scripts/vstf/common/decorator.py | |
parent | c84e4a663343a1d19073ce73a5c0596a99d84a52 (diff) | |
parent | 6204bfbe6228d5167bdb67c42cac4c884cdcf664 (diff) |
Merge "autopep8 fix for flake8"
Diffstat (limited to 'testsuites/vstf/vstf_scripts/vstf/common/decorator.py')
-rw-r--r-- | testsuites/vstf/vstf_scripts/vstf/common/decorator.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/testsuites/vstf/vstf_scripts/vstf/common/decorator.py b/testsuites/vstf/vstf_scripts/vstf/common/decorator.py index 98d539f1..ed910556 100644 --- a/testsuites/vstf/vstf_scripts/vstf/common/decorator.py +++ b/testsuites/vstf/vstf_scripts/vstf/common/decorator.py @@ -17,7 +17,9 @@ def check(key, choices=[], defaults=_DEFAULTS): if defaults != _DEFAULTS: kwargs[key] = defaults else: - raise Exception("Error: '%s' is needed in %s" % (key, func)) + raise Exception( + "Error: '%s' is needed in %s" % + (key, func)) if choices and kwargs[key] not in choices: raise Exception("Error: %s :%s" % (key, kwargs[key])) @@ -40,7 +42,9 @@ def dcheck(key, choices=[]): values = None if isinstance(values, dict): if key not in values: - raise Exception("Error: '%s' is needed in %s" % (key, func)) + raise Exception( + "Error: '%s' is needed in %s" % + (key, func)) if choices and values[key] not in choices: raise Exception("Error: %s :%s" % (key, values[key])) ret = func(*args) @@ -84,7 +88,8 @@ def namespace(): ret = func(*args, **kwargs) nspace = kwargs.get("namespace", None) if nspace: - ret = "ip netns exec %(namespace)s " % {"namespace": nspace} + ret + ret = "ip netns exec %(namespace)s " % { + "namespace": nspace} + ret return ret return __deco |