Merge pull request #417 from JackDandy/feature/ChangeImportingMovesReload

Change reload_module call to explicit import lib/six.moves.
This commit is contained in:
JackDandy 2015-06-14 18:22:34 +01:00
commit 2193064fff
3 changed files with 5 additions and 5 deletions

View file

@ -51,6 +51,7 @@
[develop changelog] [develop changelog]
* Update Requests library 2.7.0 (ab1f493) to 2.7.0 (8b5e457) * Update Requests library 2.7.0 (ab1f493) to 2.7.0 (8b5e457)
* Update Tornado webserver from 4.2.dev1 (609dbb9) to 4.2b1 (61a16c9) * Update Tornado webserver from 4.2.dev1 (609dbb9) to 4.2b1 (61a16c9)
* Change reload_module call to explicit import lib/six.moves
### 0.9.1 (2015-05-25 03:03:00 UTC) ### 0.9.1 (2015-05-25 03:03:00 UTC)

View file

@ -49,7 +49,7 @@ except:
sys.exit(1) sys.exit(1)
sys.path.insert(1, os.path.abspath(os.path.join(os.path.dirname(__file__), 'lib'))) sys.path.insert(1, os.path.abspath(os.path.join(os.path.dirname(__file__), 'lib')))
from six.moves import reload_module from lib.six import moves
# We only need this for compiling an EXE and I will just always do that on 2.6+ # We only need this for compiling an EXE and I will just always do that on 2.6+
if sys.hexversion >= 0x020600F0: if sys.hexversion >= 0x020600F0:
@ -141,7 +141,7 @@ class SickGear(object):
sickbeard.SYS_ENCODING = 'UTF-8' sickbeard.SYS_ENCODING = 'UTF-8'
if not hasattr(sys, 'setdefaultencoding'): if not hasattr(sys, 'setdefaultencoding'):
reload_module(sys) moves.reload_module(sys)
try: try:
# pylint: disable=E1101 # pylint: disable=E1101

View file

@ -26,8 +26,7 @@ from os.path import basename, join, isfile
import os import os
import re import re
import datetime import datetime
from six import iteritems from lib.six import iteritems, moves
from six.moves import reload_module
# regex to parse time (12/24 hour format) # regex to parse time (12/24 hour format)
time_regex = re.compile(r'(\d{1,2})(([:.](\d{2,2}))? ?([PA][. ]? ?M)|[:.](\d{2,2}))\b', flags=re.IGNORECASE) time_regex = re.compile(r'(\d{1,2})(([:.](\d{2,2}))? ?([PA][. ]? ?M)|[:.](\d{2,2}))\b', flags=re.IGNORECASE)
@ -127,7 +126,7 @@ def _update_zoneinfo():
# rename downloaded file # rename downloaded file
ek.ek(os.rename, zonefile_tmp, zonefile) ek.ek(os.rename, zonefile_tmp, zonefile)
# load the new zoneinfo # load the new zoneinfo
reload_module(lib.dateutil.zoneinfo) moves.reload_module(lib.dateutil.zoneinfo)
sb_timezone = tz.tzlocal() sb_timezone = tz.tzlocal()
except: except:
_remove_zoneinfo_failed(zonefile_tmp) _remove_zoneinfo_failed(zonefile_tmp)