mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +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;
|
break;
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
if (time.time() - start_time) >= self.timeout:
|
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
|
return False
|
||||||
#xbmc.log("File_Lock_On " + self.filename + " error " + str(e))
|
#xbmc.log("File_Lock_On " + self.filename + " error " + str(e))
|
||||||
time.sleep(self.delay)
|
time.sleep(self.delay)
|
||||||
self.is_locked = True
|
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
|
return True
|
||||||
|
|
||||||
def release(self):
|
def release(self):
|
||||||
|
@ -33,7 +33,7 @@ class Lock:
|
||||||
os.close(self.fd)
|
os.close(self.fd)
|
||||||
os.unlink(self.filename)
|
os.unlink(self.filename)
|
||||||
self.is_locked = False
|
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):
|
def __del__(self):
|
||||||
self.release()
|
self.release()
|
||||||
|
|
Loading…
Reference in a new issue