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

Commit c6fd846

Browse files
committed
fix: migrate code to 0.3
1 parent 90f9291 commit c6fd846

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

Contents/Code/plex_api_helper.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -751,10 +751,6 @@ def get_user_info(token):
751751
>>> get_user_info(token='...')
752752
...
753753
"""
754-
global plex
755-
if not plex:
756-
plex = setup_plexapi()
757-
758754
try:
759755
return MyPlexAccount(token=token)
760756
except Exception:
@@ -781,8 +777,6 @@ def is_server_owner(user):
781777
>>> is_server_owner(user=...)
782778
...
783779
"""
784-
global plex
785-
if not plex:
786-
plex = setup_plexapi()
780+
plex = setup_plexapi()
787781

788782
return plex.account().username in {user.email, user.username}

0 commit comments

Comments
 (0)