File tree Expand file tree Collapse file tree 5 files changed +14
-2
lines changed
Expand file tree Collapse file tree 5 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 1111#
1212###################################################################
1313
14- __version__ = "1.0.14 "
14+ __version__ = "1.0.17 "
1515__author__ = "Frederick Stallmeyer <fraizy@gmx.de>"
1616__license__ = "MIT"
1717
Original file line number Diff line number Diff line change 4545
4646
4747SEND_LOOP_MAX_SLEEP_TIME = 0.05
48+ KLYQA_CTL_VERSION = "1.0.17"
4849
4950DeviceType = Enum ("DeviceType" , "cleaner lighting" )
5051
Original file line number Diff line number Diff line change @@ -47,6 +47,13 @@ def add_config_args(parser: argparse.ArgumentParser) -> None:
4747 nargs = 1 ,
4848 help = "timeout in seconds for the response of the devices" ,
4949 )
50+ parser .add_argument (
51+ "--version" ,
52+ action = "store_const" ,
53+ const = True ,
54+ default = False ,
55+ help = "print klyqa-ctl module version" ,
56+ )
5057 parser .add_argument (
5158 "--device_name" ,
5259 nargs = 1 ,
Original file line number Diff line number Diff line change @@ -2078,6 +2078,10 @@ def main():
20782078 sys .exit (1 )
20792079
20802080 args_parsed = parser .parse_args (args = args_in )
2081+
2082+ if args_parsed .version :
2083+ print (KLYQA_CTL_VERSION )
2084+ sys .exit (0 )
20812085
20822086 if not args_parsed :
20832087 sys .exit (1 )
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ source ./bin/activate
2020echo " install klyqa ctl package ..."
2121python3.9 -m pip install $target
2222echo " test klyqa ctl package module ..."
23- python3.9 -m klyqa_ctl --help
23+ python3.9 -m klyqa_ctl lighting --version
2424echo " is working ..."
2525)
2626
You can’t perform that action at this time.
0 commit comments