File tree 1 file changed +19
-4
lines changed
1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -109,10 +109,25 @@ def start_shell():
109
109
def add_arguments ():
110
110
parser = argparse .ArgumentParser (description = __doc__ )
111
111
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
+
116
131
return parser .parse_args ()
117
132
118
133
You can’t perform that action at this time.
0 commit comments