Skip to content

Commit 1587aa7

Browse files
authored
python3 compatibility for raise
python3 compatibility for raise
1 parent b201df0 commit 1587aa7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plexapi/library.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ def modeUpdate(self, mode=None):
10271027
'showItems': '2'}
10281028
key = mode_dict.get(mode)
10291029
if mode is None:
1030-
raise BadRequest('Unknown collection mode : %s. Options %s' % (mode, mode_dict.key()))
1030+
raise BadRequest('Unknown collection mode : %s. Options %s' % (mode, list(mode_dict.key())))
10311031
part = '/library/metadata/%s/prefs?collectionMode=%s' % (self.ratingKey, key)
10321032
return self._server.query(part, method=self._server._session.put)
10331033

@@ -1047,7 +1047,7 @@ def sortUpdate(self, sort=None):
10471047
'alpha': '1'}
10481048
key = sort_dict.get(sort)
10491049
if key is None:
1050-
raise BadRequest('Unknown sort dir: %s. Options: %s' % (sort, sort_dict.keys()))
1050+
raise BadRequest('Unknown sort dir: %s. Options: %s' % (sort, list(sort_dict.keys())))
10511051
part = '/library/metadata/%s/prefs?collectionSort=%s' % (self.ratingKey, key)
10521052
return self._server.query(part, method=self._server._session.put)
10531053

0 commit comments

Comments
 (0)