Diff
Differences From Artifact [c8d63f1db6]:
- File cli.py — part of check-in [a7c3f7336a] at 2015-04-07 05:53:39 on branch trunk — Fix a few CLI bugs (doesn't work yet with dynamic module list), stub_parent() implementations for non-GUI mode should be merged. (user: mario, size: 4576) [annotate] [blame] [check-ins using]
To Artifact [9a0f511a31]:
- File cli.py — part of check-in [ecc88e5d3e] at 2015-04-23 01:09:07 on branch trunk — Remove some print statements, and switch to log.FUNC where necessary. (user: mario, size: 4579) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
48 49 50 51 52 53 54 |
a = self.help
# first cmdline arg == action
else:
command = actions[0]
if command in dir(self):
cmd = self.__getattribute__(command)
else:
| | | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
a = self.help
# first cmdline arg == action
else:
command = actions[0]
if command in dir(self):
cmd = self.__getattribute__(command)
else:
log.ERR("No such command:", command)
return
# run
result = cmd(*actions[1:])
if result:
self.json(result)
|
| ︙ | ︙ |