mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-06-19 01:03:53 +00:00
instead of checking if item is list or tuple, just check if it's iterable
This commit is contained in:
parent
ef69d4dde4
commit
77b2bd90bc
@ -6,6 +6,7 @@ __all__ = ["CLIENT_CREDS_ENV_VARS", "get_host_port", "normalize_scope", "Retry"]
|
||||
|
||||
import logging
|
||||
from types import TracebackType
|
||||
from collections.abc import Iterable
|
||||
|
||||
import urllib3
|
||||
|
||||
@ -48,7 +49,8 @@ def normalize_scope(scope):
|
||||
if scope:
|
||||
if isinstance(scope, str):
|
||||
scopes = scope.split(',')
|
||||
elif isinstance(scope, list) or isinstance(scope, tuple):
|
||||
|
||||
elif isinstance(scope, Iterable):
|
||||
scopes = scope
|
||||
else:
|
||||
raise Exception(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user