mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-12-22 14:05:23 +01:00
minor code fixes based on travis-ci output
This commit is contained in:
parent
a7b9aeb9c1
commit
6dfa4a5520
@ -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
|
||||
|
@ -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:
|
||||
|
@ -1,4 +1,4 @@
|
||||
import utils as utils
|
||||
from . import utils as utils
|
||||
|
||||
class ZipExtractor:
|
||||
|
||||
|
@ -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
|
||||
|
@ -1,5 +1,5 @@
|
||||
import utils as utils
|
||||
import xbmcgui
|
||||
from . import utils as utils
|
||||
|
||||
class BackupProgressBar:
|
||||
NONE = 2
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user