Revision e15d78e2 kamaki/cli/commands/__init__.py
b/kamaki/cli/commands/__init__.py | ||
---|---|---|
39 | 39 |
|
40 | 40 |
class _command_init(object): |
41 | 41 |
def __init__(self, arguments={}): |
42 |
if not hasattr(self, 'arguments'):
|
|
43 |
self.arguments = {}
|
|
44 |
self.arguments.update(arguments)
|
|
42 |
if hasattr(self, 'arguments'): |
|
43 |
arguments.update(self.arguments)
|
|
44 |
self.arguments = dict(arguments)
|
|
45 | 45 |
try: |
46 |
self.config = self['config'].value
|
|
46 |
self.config = self['config'] |
|
47 | 47 |
#self.config = self.get_argument('config') |
48 | 48 |
except KeyError: |
49 | 49 |
pass |
... | ... | |
89 | 89 |
|
90 | 90 |
:raises KeyError: if argterm not in self.arguments of this object |
91 | 91 |
""" |
92 |
return self.arguments[argterm] |
|
92 |
return self[argterm] |
Also available in: Unified diff