mirror of
https://github.com/SickGear/SickGear.git
synced 2024-11-25 06:15:04 +00:00
Merge branch 'feature/UpdateDateutil' into dev
This commit is contained in:
commit
1a300f5eea
6 changed files with 10 additions and 7 deletions
|
@ -3,6 +3,7 @@
|
||||||
* Update Apprise 1.3.0 (6458ab0) to 1.6.0 (0c0d5da)
|
* Update Apprise 1.3.0 (6458ab0) to 1.6.0 (0c0d5da)
|
||||||
* Update attr 22.2.0 (683d056) to 23.1.0 (67e4ff2)
|
* Update attr 22.2.0 (683d056) to 23.1.0 (67e4ff2)
|
||||||
* Update Beautiful Soup 4.12.2 to 4.12.2 (30c58a1)
|
* Update Beautiful Soup 4.12.2 to 4.12.2 (30c58a1)
|
||||||
|
* Update dateutil 2.8.2 (28da62d) to 2.8.2 (296d419)
|
||||||
* Update diskcache 5.6.1 (4d30686) to 5.6.3 (323787f)
|
* Update diskcache 5.6.1 (4d30686) to 5.6.3 (323787f)
|
||||||
* Update hachoir 3.1.2 (f739b43) to 3.2.0 (38d759f)
|
* Update hachoir 3.1.2 (f739b43) to 3.2.0 (38d759f)
|
||||||
* Update Pytvmaze library 2.0.8 (81888a5) to 2.0.8 (b451391)
|
* Update Pytvmaze library 2.0.8 (81888a5) to 2.0.8 (b451391)
|
||||||
|
|
|
@ -72,7 +72,7 @@ class isoparser(object):
|
||||||
Common:
|
Common:
|
||||||
|
|
||||||
- ``YYYY``
|
- ``YYYY``
|
||||||
- ``YYYY-MM`` or ``YYYYMM``
|
- ``YYYY-MM``
|
||||||
- ``YYYY-MM-DD`` or ``YYYYMMDD``
|
- ``YYYY-MM-DD`` or ``YYYYMMDD``
|
||||||
|
|
||||||
Uncommon:
|
Uncommon:
|
||||||
|
|
|
@ -182,7 +182,7 @@ class rrulebase(object):
|
||||||
# __len__() introduces a large performance penalty.
|
# __len__() introduces a large performance penalty.
|
||||||
def count(self):
|
def count(self):
|
||||||
""" Returns the number of recurrences in this set. It will have go
|
""" Returns the number of recurrences in this set. It will have go
|
||||||
trough the whole recurrence, if this hasn't been done before. """
|
through the whole recurrence, if this hasn't been done before. """
|
||||||
if self._len is None:
|
if self._len is None:
|
||||||
for x in self:
|
for x in self:
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -34,7 +34,7 @@ except ImportError:
|
||||||
from warnings import warn
|
from warnings import warn
|
||||||
|
|
||||||
ZERO = datetime.timedelta(0)
|
ZERO = datetime.timedelta(0)
|
||||||
EPOCH = datetime.datetime.utcfromtimestamp(0)
|
EPOCH = datetime.datetime(1970, 1, 1, 0, 0)
|
||||||
EPOCHORDINAL = EPOCH.toordinal()
|
EPOCHORDINAL = EPOCH.toordinal()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,8 @@ from io import BytesIO
|
||||||
|
|
||||||
from dateutil.tz import tzfile as _tzfile
|
from dateutil.tz import tzfile as _tzfile
|
||||||
|
|
||||||
|
# noinspection PyPep8Naming
|
||||||
|
import encodingKludge as ek
|
||||||
import sickgear
|
import sickgear
|
||||||
|
|
||||||
__all__ = ["get_zonefile_instance", "gettz", "gettz_db_metadata"]
|
__all__ = ["get_zonefile_instance", "gettz", "gettz_db_metadata"]
|
||||||
|
@ -25,10 +27,10 @@ class tzfile(_tzfile):
|
||||||
def getzoneinfofile_stream():
|
def getzoneinfofile_stream():
|
||||||
try:
|
try:
|
||||||
# return BytesIO(get_data(__name__, ZONEFILENAME))
|
# return BytesIO(get_data(__name__, ZONEFILENAME))
|
||||||
zonefile = os.path.join(sickgear.ZONEINFO_DIR, ZONEFILENAME)
|
zonefile = ek.ek(os.path.join, sickgear.ZONEINFO_DIR, ZONEFILENAME)
|
||||||
if not os.path.isfile(zonefile):
|
if not ek.ek(os.path.isfile, zonefile):
|
||||||
warnings.warn('Falling back to included zoneinfo file')
|
warnings.warn('Falling back to included zoneinfo file')
|
||||||
zonefile = os.path.join(os.path.dirname(__file__), ZONEFILENAME)
|
zonefile = ek.ek(os.path.join, ek.ek(os.path.dirname, __file__), ZONEFILENAME)
|
||||||
with open(zonefile, 'rb') as f:
|
with open(zonefile, 'rb') as f:
|
||||||
return BytesIO(f.read())
|
return BytesIO(f.read())
|
||||||
except IOError as e: # TODO switch to FileNotFoundError?
|
except IOError as e: # TODO switch to FileNotFoundError?
|
||||||
|
|
Loading…
Reference in a new issue