Skip to content

Commit

Permalink
script.module.slyguy -> v0.73.6
Browse files Browse the repository at this point in the history
  • Loading branch information
matthuisman authored and johnny5-is-alive committed Oct 2, 2023
1 parent 8c39fc4 commit e03cbd2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion script.module.slyguy/addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.module.slyguy" name="SlyGuy Common" provider-name="SlyGuy" version="0.73.5">
<addon id="script.module.slyguy" name="SlyGuy Common" provider-name="SlyGuy" version="0.73.6">
<requires>
<import addon="slyguy.dependencies" version="0.0.8"/>
<import addon="repository.slyguy" version="0.0.4"/>
Expand Down
13 changes: 13 additions & 0 deletions script.module.slyguy/resources/modules/slyguy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
import sys
import datetime

from .log import log
from .constants import ADDON_ID, COMMON_ADDON_ID, DEPENDENCIES_ADDON_ID

# python embedded (as used in kodi) has a known bug for second calls of strptime.
# The python bug is docmumented here https://bugs.python.org/issue27400
# The following workaround patch is borrowed from https://forum.kodi.tv/showthread.php?tid=112916&pid=2914578#pid2914578
class proxydt(datetime.datetime):
@staticmethod
def strptime(date_string, format):
import time
return datetime.datetime(*(time.strptime(date_string, format)[0:6]))

log.debug('patching datetime.datetime')
datetime.datetime = proxydt

log.debug('sys.path: {}'.format(sys.path))
if ADDON_ID not in sys.path[0]:
paths = [None, None, None]
Expand Down

0 comments on commit e03cbd2

Please sign in to comment.