File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed
Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -109,10 +109,25 @@ def start_shell():
109109def add_arguments ():
110110 parser = argparse .ArgumentParser (description = __doc__ )
111111 for argument in get_arguments ():
112- arg_type = 'store' if argument [2 ] else 'store_true'
113- parser .add_argument (argument [0 ], help = argument [1 ], action = arg_type )
114- parser .add_argument ("--client" , action = "store" , dest = "client" ,
115- help = "sets client's dbus name" , default = "spotify" )
112+ if len (argument ) > 2 and argument [2 ]:
113+ arg_type = 'store'
114+ else :
115+ arg_type = 'store_true'
116+
117+ parser .add_argument (
118+ argument [0 ],
119+ help = argument [1 ],
120+ action = arg_type
121+ )
122+
123+ parser .add_argument (
124+ "--client" ,
125+ action = "store" ,
126+ dest = "client" ,
127+ help = "sets client's dbus name" ,
128+ default = "spotify"
129+ )
130+
116131 return parser .parse_args ()
117132
118133
You can’t perform that action at this time.
0 commit comments