File tree Expand file tree Collapse file tree 3 files changed +11
-16
lines changed
Expand file tree Collapse file tree 3 files changed +11
-16
lines changed Original file line number Diff line number Diff line change 1414
1515# PlexAPI Settings
1616PROJECT = 'PlexAPI'
17- VERSION = '3.1 .0'
17+ VERSION = '3.2 .0'
1818TIMEOUT = CONFIG .get ('plexapi.timeout' , 30 , int )
1919X_PLEX_CONTAINER_SIZE = CONFIG .get ('plexapi.container_size' , 100 , int )
2020X_PLEX_ENABLE_FAST_CONNECT = CONFIG .get ('plexapi.enable_fast_connect' , False , bool )
Original file line number Diff line number Diff line change 4444except ImportError :
4545 from xml .etree import ElementTree
4646
47+ try :
48+ from unittest .mock import patch , MagicMock
49+ except ImportError :
50+ from mock import patch , MagicMock
51+
4752
4853def makedirs (name , mode = 0o777 , exist_ok = False ):
4954 """ Mimicks os.makedirs() from Python 3. """
Original file line number Diff line number Diff line change 11# -*- coding: utf-8 -*-
2+ import plexapi
3+ import pytest
4+ import requests
25import time
36from datetime import datetime
47from functools import partial
58from os import environ
6-
7- import pytest
8- import requests
9-
109from plexapi .myplex import MyPlexAccount
11-
12- try :
13- from unittest .mock import patch , MagicMock
14- except ImportError :
15- from mock import patch , MagicMock
16-
17-
18- import plexapi
1910from plexapi import compat
11+ from plexapi .compat import patch , MagicMock
2012from plexapi .client import PlexClient
21-
2213from plexapi .server import PlexServer
2314
24-
2515SERVER_BASEURL = plexapi .CONFIG .get ('auth.server_baseurl' )
2616MYPLEX_USERNAME = plexapi .CONFIG .get ('auth.myplex_username' )
2717MYPLEX_PASSWORD = plexapi .CONFIG .get ('auth.myplex_password' )
@@ -229,7 +219,7 @@ def episode(show):
229219def photoalbum (photos ):
230220 try :
231221 return photos .get ('Cats' )
232- except :
222+ except Exception :
233223 return photos .get ('photo_album1' )
234224
235225
You can’t perform that action at this time.
0 commit comments