Actions
Bug #49495
closedqa/ceph_manager: raw_cluster_cmd passes both args and kwargs
% Done:
0%
Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
See: https://github.com/ceph/ceph/commit/c0907f99e87898f7e0afd47f4ed143b20a477cb7
Following is dummy program demonstrating the issue -
def a(args, stdout=None, stderr=None): print('running a()') print(f'args - {args}') print(f'stdout - {stdout}') print(f'stderr - {stderr}') def b(*args, **kwargs): print('running b()') stdout = kwargs.pop('stdout', 'efgh') a(args=args, stdout=stdout, **kwargs) b('abcd') b(args='abcd', stdout='efgh')
Here's the output -
running b() running a() args - ('abcd',) stdout - efgh stderr - None running b() Traceback (most recent call last): File "temp.py", line 13, in <module> b(args='abcd', stdout='efgh') File "temp.py", line 10, in b a(args=args, stdout=stdout, **kwargs) TypeError: a() got multiple values for keyword argument 'args'
Updated by Kefu Chai about 3 years ago
- Status changed from In Progress to Resolved
Actions