mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-11-14 20:35:48 +01:00
pep8 fixes
This commit is contained in:
parent
5e2d099448
commit
710bcd08f8
@ -10,5 +10,5 @@ before_script:
|
|||||||
|
|
||||||
# command to run our tests
|
# command to run our tests
|
||||||
script:
|
script:
|
||||||
- flake8 ./ --statistics --show-source --ignore=E501,E722 --exclude=croniter.py,relativedelta.py,*/dropbox/* # check python structure against flake8 tests, ignore long lines
|
- flake8 ./ --statistics --show-source --builtins=sys --ignore=E501,E722 --exclude=croniter.py,relativedelta.py,*/dropbox/* # check python structure against flake8 tests, ignore long lines
|
||||||
- kodi-addon-checker --branch=matrix --allow-folder-id-mismatch
|
- kodi-addon-checker --branch=matrix --allow-folder-id-mismatch
|
@ -181,14 +181,14 @@ class AdvancedBackupEditor:
|
|||||||
while(exitCondition != -1):
|
while(exitCondition != -1):
|
||||||
# load the custom paths
|
# load the custom paths
|
||||||
listItem = xbmcgui.ListItem(utils.getString(30126), '')
|
listItem = xbmcgui.ListItem(utils.getString(30126), '')
|
||||||
listItem.setArt({'icon': os.path.join(utils.addon_dir(),'resources','images','plus-icon.png')})
|
listItem.setArt({'icon': os.path.join(utils.addon_dir(), 'resources', 'images', 'plus-icon.png')})
|
||||||
options = [listItem]
|
options = [listItem]
|
||||||
|
|
||||||
for index in range(0, len(customPaths.getSets())):
|
for index in range(0, len(customPaths.getSets())):
|
||||||
aSet = customPaths.getSet(index)
|
aSet = customPaths.getSet(index)
|
||||||
|
|
||||||
listItem = xbmcgui.ListItem(aSet['name'], utils.getString(30121) + ': ' + aSet['set']['root'])
|
listItem = xbmcgui.ListItem(aSet['name'], utils.getString(30121) + ': ' + aSet['set']['root'])
|
||||||
listItem.setArt({'icon': os.path.join(utils.addon_dir(),'resources','images','folder-icon.png')})
|
listItem.setArt({'icon': os.path.join(utils.addon_dir(), 'resources', 'images', 'folder-icon.png')})
|
||||||
options.append(listItem)
|
options.append(listItem)
|
||||||
|
|
||||||
# show the gui
|
# show the gui
|
||||||
@ -227,7 +227,7 @@ class AdvancedBackupEditor:
|
|||||||
shouldContinue = self.dialog.yesno(utils.getString(30139), utils.getString(30140), utils.getString(30141))
|
shouldContinue = self.dialog.yesno(utils.getString(30139), utils.getString(30140), utils.getString(30141))
|
||||||
|
|
||||||
if(shouldContinue):
|
if(shouldContinue):
|
||||||
source = xbmc.translatePath(os.path.join(utils.addon_dir(),'resources','data','default_files.json'))
|
source = xbmc.translatePath(os.path.join(utils.addon_dir(), 'resources', 'data', 'default_files.json'))
|
||||||
dest = xbmc.translatePath(os.path.join(utils.data_dir(),'custom_paths.json'))
|
dest = xbmc.translatePath(os.path.join(utils.data_dir(), 'custom_paths.json'))
|
||||||
|
|
||||||
xbmcvfs.copy(source, dest)
|
xbmcvfs.copy(source, dest)
|
||||||
|
@ -522,7 +522,7 @@ class XbmcBackup:
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
def _createResumeBackupFile(self):
|
def _createResumeBackupFile(self):
|
||||||
with xbmcvfs.File(xbmc.translatePath(utils.data_dir() + "resume.txt"), 'w') as f:
|
with xbmcvfs.File(xbmc.translatePath(utils.data_dir() + "resume.txt"), 'w') as f:
|
||||||
f.write(self.restore_point)
|
f.write(self.restore_point)
|
||||||
|
|
||||||
def _readBackupConfig(self, aFile):
|
def _readBackupConfig(self, aFile):
|
||||||
|
Loading…
Reference in New Issue
Block a user