Skip to content
This repository was archived by the owner on Oct 20, 2018. It is now read-only.

Commit 177fe1a

Browse files
author
Mark Challoner
committed
Fix "AttributeError: 'NoneType' object has no attribute 'group'" on split_field.group(1).
1 parent 5adb535 commit 177fe1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gmusicapi_wrapper/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def _split_field_to_single_value(field):
5454

5555
split_field = re.match(r'(\d+)/\d+', field)
5656

57-
return split_field.group(1) or field
57+
return split_field and split_field.group(1) or field
5858

5959

6060
def _filter_comparison_fields(song):

0 commit comments

Comments
 (0)