Show More
@@ -2014,12 +2014,12 b' def command(table):' | |||||
2014 | '''returns a function object bound to table which can be used as |
|
2014 | '''returns a function object bound to table which can be used as | |
2015 | a decorator for populating table as a command table''' |
|
2015 | a decorator for populating table as a command table''' | |
2016 |
|
2016 | |||
2017 | def cmd(name, options, synopsis=None): |
|
2017 | def cmd(name, options=(), synopsis=None): | |
2018 | def decorator(func): |
|
2018 | def decorator(func): | |
2019 | if synopsis: |
|
2019 | if synopsis: | |
2020 |
table[name] = func, options |
|
2020 | table[name] = func, list(options), synopsis | |
2021 | else: |
|
2021 | else: | |
2022 |
table[name] = func, options |
|
2022 | table[name] = func, list(options) | |
2023 | return func |
|
2023 | return func | |
2024 | return decorator |
|
2024 | return decorator | |
2025 |
|
2025 |
General Comments 0
You need to be logged in to leave comments.
Login now