Skip to content

Commit

Permalink
fix for rdegges#17
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Schuler committed Nov 21, 2018
1 parent 5eea22a commit fbad741
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ skele-cli
*A skeleton command line program in Python.*


**THIS IS A FORK FROM https://github.com/rdegges/skele-cli THAT SOLVES https://github.com/rdegges/skele-cli/issues/17**

Purpose
-------

Expand Down
11 changes: 6 additions & 5 deletions skele/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ def main():

# Here we'll try to dynamically match the command the user is trying to run
# with a pre-defined command class we've already created.
for (k, v) in options.items():
if hasattr(skele.commands, k) and v:
module = getattr(skele.commands, k)
skele.commands = getmembers(module, isclass)
command = [command[1] for command in skele.commands if command[0] != 'Base'][0]
for (k, v) in options.items():
if hasattr(unchained.commands, k) and v:
module = getattr(unchained.commands, k)
unchained.commands = getmembers(module, isclass)
command = [c for c in unchained.commands if
c[0].lower() == k.lower()][0][1]
command = command(options)
command.run()

0 comments on commit fbad741

Please sign in to comment.