minor code fixes based on travis-ci output

This commit is contained in:
Rob Weber 2019-09-30 14:06:50 -05:00
parent a7b9aeb9c1
commit 6dfa4a5520
6 changed files with 16 additions and 16 deletions

View File

@ -1,8 +1,8 @@
import json
import utils as utils
import xbmcvfs
import xbmc
import xbmcgui
from . import utils as utils
class BackupSetManager:
jsonFile = xbmc.translatePath(utils.data_dir() + "custom_paths.json")
@ -38,7 +38,7 @@ class BackupSetManager:
def getSets(self):
#list all current sets by name
keys = self.paths.keys()
keys = list(self.paths.keys())
keys.sort()
return keys

View File

@ -1,12 +1,12 @@
import xbmc
import xbmcgui
import xbmcvfs
import utils as utils
import time
import json
from . import utils as utils
from datetime import datetime
from vfs import XBMCFileSystem,DropboxFileSystem,ZipFileSystem,GoogleDriveFilesystem
from progressbar import BackupProgressBar
from .vfs import XBMCFileSystem,DropboxFileSystem,ZipFileSystem,GoogleDriveFilesystem
from .progressbar import BackupProgressBar
from resources.lib.guisettings import GuiSettingsManager
from resources.lib.extractor import ZipExtractor
@ -141,7 +141,7 @@ class XbmcBackup:
selectedDirs = self._readBackupConfig(utils.data_dir() + "/custom_paths.json")
#get the set names
keys = selectedDirs.keys()
keys = list(selectedDirs.keys())
#go through the custom sets
for aKey in keys:

View File

@ -1,4 +1,4 @@
import utils as utils
from . import utils as utils
class ZipExtractor:

View File

@ -1,8 +1,8 @@
import utils as utils
from xml.dom import minidom
from xml.parsers.expat import ExpatError
import json
import xbmc,xbmcvfs
from . import utils as utils
from xml.dom import minidom
from xml.parsers.expat import ExpatError
class GuiSettingsManager:
@ -30,11 +30,11 @@ class GuiSettingsManager:
restoreSettings = self.__parseNodes(self.doc.getElementsByTagName('setting'))
#get a list where the restore setting value != the current value
updateSettings = {k: v for k, v in restoreSettings.items() if (k in currentSettings and currentSettings[k] != v)}
updateSettings = {k: v for k, v in list(restoreSettings.items()) if (k in currentSettings and currentSettings[k] != v)}
#go through all the found settings and update them
jsonObj = {"jsonrpc":"2.0","id":1,"method":"Settings.SetSettingValue","params":{"setting":"","value":""}}
for anId, aValue in updateSettings.items():
for anId, aValue in list(updateSettings.items()):
utils.log("updating: " + anId + ", value: " + str(aValue))
jsonObj['params']['setting'] = anId

View File

@ -1,5 +1,5 @@
import utils as utils
import xbmcgui
from . import utils as utils
class BackupProgressBar:
NONE = 2

View File

@ -1,4 +1,3 @@
import utils as utils
import xbmc
import xbmcvfs
import xbmcgui
@ -6,8 +5,9 @@ import zipfile
import os.path
import sys
import dropbox
from . import utils as utils
from dropbox.files import WriteMode,CommitInfo,UploadSessionCursor
from authorizers import DropboxAuthorizer,GoogleDriveAuthorizer
from .authorizers import DropboxAuthorizer,GoogleDriveAuthorizer
class Vfs:
root_path = None
@ -417,7 +417,7 @@ class GoogleDriveFilesystem(Vfs):
if(file.endswith('/')):
file = file[:-1]
if(self.history.has_key(file)):
if(file in self.history):
result = self.history[file]
else: