mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-10-09 02:41:06 +03:00
Fix some more pep8 warnings
This commit is contained in:
parent
fd417425ae
commit
0f0ccdb1e1
5 changed files with 7 additions and 5 deletions
|
@ -44,7 +44,7 @@ def check_http(app):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
if not 'Update Check Data' in app:
|
if 'Update Check Data' not in app:
|
||||||
raise Exception('Missing Update Check Data')
|
raise Exception('Missing Update Check Data')
|
||||||
|
|
||||||
urlcode, codeex, urlver, verex = app['Update Check Data'].split('|')
|
urlcode, codeex, urlver, verex = app['Update Check Data'].split('|')
|
||||||
|
|
|
@ -280,7 +280,7 @@ def getvcs(vcstype, remote, local):
|
||||||
|
|
||||||
|
|
||||||
def getsrclibvcs(name):
|
def getsrclibvcs(name):
|
||||||
if not name in metadata.srclibs:
|
if name not in metadata.srclibs:
|
||||||
raise VCSException("Missing srclib " + name)
|
raise VCSException("Missing srclib " + name)
|
||||||
return metadata.srclibs[name]['Repo Type']
|
return metadata.srclibs[name]['Repo Type']
|
||||||
|
|
||||||
|
@ -939,7 +939,7 @@ def getsrclib(spec, srclib_dir, srclibpaths=[], subdir=None,
|
||||||
if '/' in name:
|
if '/' in name:
|
||||||
name, subdir = name.split('/', 1)
|
name, subdir = name.split('/', 1)
|
||||||
|
|
||||||
if not name in metadata.srclibs:
|
if name not in metadata.srclibs:
|
||||||
raise BuildException('srclib ' + name + ' not found.')
|
raise BuildException('srclib ' + name + ' not found.')
|
||||||
|
|
||||||
srclib = metadata.srclibs[name]
|
srclib = metadata.srclibs[name]
|
||||||
|
@ -1434,7 +1434,7 @@ class KnownApks:
|
||||||
# Record an apk (if it's new, otherwise does nothing)
|
# Record an apk (if it's new, otherwise does nothing)
|
||||||
# Returns the date it was added.
|
# Returns the date it was added.
|
||||||
def recordapk(self, apk, app):
|
def recordapk(self, apk, app):
|
||||||
if not apk in self.apks:
|
if apk not in self.apks:
|
||||||
self.apks[apk] = (app, time.gmtime(time.time()))
|
self.apks[apk] = (app, time.gmtime(time.time()))
|
||||||
self.changed = True
|
self.changed = True
|
||||||
_, added = self.apks[apk]
|
_, added = self.apks[apk]
|
||||||
|
|
|
@ -25,6 +25,7 @@ import logging
|
||||||
|
|
||||||
srclibs = {}
|
srclibs = {}
|
||||||
|
|
||||||
|
|
||||||
class MetaDataException(Exception):
|
class MetaDataException(Exception):
|
||||||
def __init__(self, value):
|
def __init__(self, value):
|
||||||
self.value = value
|
self.value = value
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
import common
|
import common
|
||||||
import metadata
|
import metadata
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
common.read_config(None)
|
common.read_config(None)
|
||||||
|
|
|
@ -129,7 +129,7 @@ def update_wiki(apps, apks):
|
||||||
if 'disable' in thisbuild:
|
if 'disable' in thisbuild:
|
||||||
if thisbuild['vercode'] == app['Current Version Code']:
|
if thisbuild['vercode'] == app['Current Version Code']:
|
||||||
cantupdate = True
|
cantupdate = True
|
||||||
#TODO: Nasty: vercode is a string in the build, and an int elsewhere
|
# TODO: Nasty: vercode is a string in the build, and an int elsewhere
|
||||||
apklist.append({'versioncode': int(thisbuild['vercode']),
|
apklist.append({'versioncode': int(thisbuild['vercode']),
|
||||||
'version': thisbuild['version'],
|
'version': thisbuild['version'],
|
||||||
'buildproblem': thisbuild['disable']
|
'buildproblem': thisbuild['disable']
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue