mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Fix unicode error
Since we are not using self.logMsg, this is needed incase the path contains unicode characters (window username)
This commit is contained in:
parent
ca2b2745db
commit
6a9eddd413
1 changed files with 3 additions and 3 deletions
|
@ -20,12 +20,12 @@ class Lock:
|
|||
break;
|
||||
except OSError as e:
|
||||
if (time.time() - start_time) >= self.timeout:
|
||||
xbmc.log("File_Lock_On " + self.filename + " timed out")
|
||||
xbmc.log("File_Lock_On " + self.filename.encode('utf-8') + " timed out")
|
||||
return False
|
||||
#xbmc.log("File_Lock_On " + self.filename + " error " + str(e))
|
||||
time.sleep(self.delay)
|
||||
self.is_locked = True
|
||||
xbmc.log("File_Lock_On " + self.filename + " obtained")
|
||||
xbmc.log("File_Lock_On " + self.filename.encode('utf-8') + " obtained")
|
||||
return True
|
||||
|
||||
def release(self):
|
||||
|
@ -33,7 +33,7 @@ class Lock:
|
|||
os.close(self.fd)
|
||||
os.unlink(self.filename)
|
||||
self.is_locked = False
|
||||
xbmc.log("File_Lock_On " + self.filename + " released")
|
||||
xbmc.log("File_Lock_On " + self.filename.encode('utf-8') + " released")
|
||||
|
||||
def __del__(self):
|
||||
self.release()
|
||||
|
|
Loading…
Reference in a new issue