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:
|
||||
|
||||
if not 'Update Check Data' in app:
|
||||
if 'Update Check Data' not in app:
|
||||
raise Exception('Missing Update Check Data')
|
||||
|
||||
urlcode, codeex, urlver, verex = app['Update Check Data'].split('|')
|
||||
|
|
|
@ -280,7 +280,7 @@ def getvcs(vcstype, remote, local):
|
|||
|
||||
|
||||
def getsrclibvcs(name):
|
||||
if not name in metadata.srclibs:
|
||||
if name not in metadata.srclibs:
|
||||
raise VCSException("Missing srclib " + name)
|
||||
return metadata.srclibs[name]['Repo Type']
|
||||
|
||||
|
@ -939,7 +939,7 @@ def getsrclib(spec, srclib_dir, srclibpaths=[], subdir=None,
|
|||
if '/' in name:
|
||||
name, subdir = name.split('/', 1)
|
||||
|
||||
if not name in metadata.srclibs:
|
||||
if name not in metadata.srclibs:
|
||||
raise BuildException('srclib ' + name + ' not found.')
|
||||
|
||||
srclib = metadata.srclibs[name]
|
||||
|
@ -1434,7 +1434,7 @@ class KnownApks:
|
|||
# Record an apk (if it's new, otherwise does nothing)
|
||||
# Returns the date it was added.
|
||||
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.changed = True
|
||||
_, added = self.apks[apk]
|
||||
|
|
|
@ -25,6 +25,7 @@ import logging
|
|||
|
||||
srclibs = {}
|
||||
|
||||
|
||||
class MetaDataException(Exception):
|
||||
def __init__(self, value):
|
||||
self.value = value
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
import common
|
||||
import metadata
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
common.read_config(None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue