Skip to content

Commit 2c5ec48

Browse files
committed
Fix IndexError and line length issues in spotifycli.py for Python 3.13
1 parent 43143c2 commit 2c5ec48

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

spotifycli/spotifycli.py

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,34 @@ def start_shell():
109109
def add_arguments():
110110
parser = argparse.ArgumentParser(description=__doc__)
111111
for argument in get_arguments():
112-
arg_type = 'store' if argument[2] else 'store_true'
112+
<<<<<<< HEAD
113+
arg_type = 'store' if len(argument) > 2 and argument[2] else 'store_true'
113114
parser.add_argument(argument[0], help=argument[1], action=arg_type)
114115
parser.add_argument("--client", action="store", dest="client",
115116
help="sets client's dbus name", default="spotify")
116117
return parser.parse_args()
118+
=======
119+
if len(argument) > 2 and argument[2]:
120+
arg_type = 'store'
121+
else:
122+
arg_type = 'store_true'
123+
>>>>>>> 3dcddf8 (Fix IndexError and line length issues in spotifycli.py for Python 3.13)
124+
125+
parser.add_argument(
126+
argument[0],
127+
help=argument[1],
128+
action=arg_type
129+
)
117130

131+
parser.add_argument(
132+
"--client",
133+
action="store",
134+
dest="client",
135+
help="sets client's dbus name",
136+
default="spotify"
137+
)
138+
139+
return parser.parse_args()
118140

119141
def get_arguments():
120142
return [

0 commit comments

Comments
 (0)