##// END OF EJS Templates
cmdutil: make options argument optional...
Pierre-Yves David -
r18235:9807e7d5 default
parent child Browse files
Show More
@@ -2014,12 +2014,12 b' def command(table):'
2014 2014 '''returns a function object bound to table which can be used as
2015 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 2018 def decorator(func):
2019 2019 if synopsis:
2020 table[name] = func, options[:], synopsis
2020 table[name] = func, list(options), synopsis
2021 2021 else:
2022 table[name] = func, options[:]
2022 table[name] = func, list(options)
2023 2023 return func
2024 2024 return decorator
2025 2025
General Comments 0
You need to be logged in to leave comments. Login now