Browse Source

Merge branch 'feature/ChangeUpdatingTZConvWarn' into develop

tags/release_0.25.1
JackDandy 5 years ago
parent
commit
946d1207cd
  1. 1
      CHANGES.md
  2. 24
      sickbeard/logger.py
  3. 8
      sickbeard/network_timezones.py

1
CHANGES.md

@ -41,6 +41,7 @@
* Change add a test for both require and ignore show specific words with partial match, both should fail
* Change init showDict for all unit tests
* Change add error handling for zoneinfo update file parsing
* Change downgrade network conversions/timezone warnings on startup to debug level
* Add enum34 1.1.10
* Add humanize 3.1.0 (aec9dc2)
* Update included fallback timezone info file to 2020d

24
sickbeard/logger.py

@ -389,6 +389,30 @@ class TimedCompressedRotatingFileHandler(TimedRotatingFileHandler):
sb_log_instance = SBRotatingLogHandler('sickgear.log')
def debug(to_log):
# type: (AnyStr) -> None
""" log message flagged as debug
:param to_log: log message
"""
sb_log_instance.log(to_log, DEBUG)
def warning(to_log):
# type: (AnyStr) -> None
""" log message flagged as warning
:param to_log: log message
"""
sb_log_instance.log(to_log, WARNING)
def error(to_log):
# type: (AnyStr) -> None
""" log message flagged as error
:param to_log: log message
"""
sb_log_instance.log(to_log, ERROR)
def log(to_log, log_level=MESSAGE):
# type: (Union[AnyStr, list], int) -> None
"""

8
sickbeard/network_timezones.py

@ -272,11 +272,10 @@ def update_network_dict():
url = 'https://raw.githubusercontent.com/Prinz23/sb_network_timezones/master/network_timezones.txt'
url_data = helpers.get_url(url)
if None is url_data:
if url_data in (None, ''):
update_last_retry()
# When None is urlData, trouble connecting to github
logger.log(u'Updating network timezones failed, this can happen from time to time. URL: %s' % url,
logger.WARNING)
logger.debug(u'Updating network timezones failed, this can happen from time to time. URL: %s' % url)
load_network_dict(load=False)
return
@ -504,8 +503,7 @@ def _load_network_conversions():
if url_data in (None, ''):
update_last_retry()
# when no url_data, trouble connecting to github
logger.log(u'Updating network conversions failed, this can happen from time to time. URL: %s' % url,
logger.WARNING)
logger.debug(u'Updating network conversions failed, this can happen from time to time. URL: %s' % url)
return
reset_last_retry()

Loading…
Cancel
Save