From 03a1893bdb5396040948eaa95cab30825e258b81 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Thu, 11 May 2017 19:29:57 +0200 Subject: [PATCH] Fix WindowsError - Partially fixes #296 --- resources/lib/userclient.py | 3 +-- resources/lib/videonodes.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/resources/lib/userclient.py b/resources/lib/userclient.py index 339334a1..04f97d16 100644 --- a/resources/lib/userclient.py +++ b/resources/lib/userclient.py @@ -211,10 +211,9 @@ class UserClient(threading.Thread): # Get /profile/addon_data addondir = xbmc.translatePath(self.addon.getAddonInfo('profile')) - hasSettings = exists("%ssettings.xml" % addondir) # If there's no settings.xml - if not hasSettings: + if not exists("%ssettings.xml" % addondir): log.error("Error, no settings.xml found.") self.auth = False return False diff --git a/resources/lib/videonodes.py b/resources/lib/videonodes.py index 8e331a09..94fa9701 100644 --- a/resources/lib/videonodes.py +++ b/resources/lib/videonodes.py @@ -75,14 +75,14 @@ class VideoNodes(object): return # Verify the video directory - if exists_dir(path) is False: + if not exists_dir(path): copytree( src=xbmc.translatePath("special://xbmc/system/library/video"), dst=xbmc.translatePath("special://profile/library/video")) # Create the node directory if mediatype != "photos": - if exists_dir(nodepath) is False: + if not exists_dir(nodepath): # folder does not exist yet log.debug('Creating folder %s' % nodepath) mkdirs(nodepath)