mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03:00
fix PEP8 "E202 whitespace before ']' or '}'"
This commit is contained in:
parent
4af2e0004f
commit
62204d1fe5
4 changed files with 22 additions and 22 deletions
|
|
@ -712,7 +712,7 @@ def manifest_paths(app_dir, flavour):
|
||||||
possible_manifests = [os.path.join(app_dir, 'AndroidManifest.xml'),
|
possible_manifests = [os.path.join(app_dir, 'AndroidManifest.xml'),
|
||||||
os.path.join(app_dir, 'src', 'main', 'AndroidManifest.xml'),
|
os.path.join(app_dir, 'src', 'main', 'AndroidManifest.xml'),
|
||||||
os.path.join(app_dir, 'src', 'AndroidManifest.xml'),
|
os.path.join(app_dir, 'src', 'AndroidManifest.xml'),
|
||||||
os.path.join(app_dir, 'build.gradle') ]
|
os.path.join(app_dir, 'build.gradle')]
|
||||||
|
|
||||||
if flavour:
|
if flavour:
|
||||||
possible_manifests.append(
|
possible_manifests.append(
|
||||||
|
|
@ -1040,9 +1040,9 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, onserver=
|
||||||
srclibpaths.append(basesrclib)
|
srclibpaths.append(basesrclib)
|
||||||
|
|
||||||
# Update the local.properties file
|
# Update the local.properties file
|
||||||
localprops = [os.path.join(build_dir, 'local.properties') ]
|
localprops = [os.path.join(build_dir, 'local.properties')]
|
||||||
if 'subdir' in build:
|
if 'subdir' in build:
|
||||||
localprops += [os.path.join(root_dir, 'local.properties') ]
|
localprops += [os.path.join(root_dir, 'local.properties')]
|
||||||
for path in localprops:
|
for path in localprops:
|
||||||
if not os.path.isfile(path):
|
if not os.path.isfile(path):
|
||||||
continue
|
continue
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ def main():
|
||||||
if args:
|
if args:
|
||||||
|
|
||||||
vercodes = common.read_pkg_args(args, True)
|
vercodes = common.read_pkg_args(args, True)
|
||||||
apks = {appid: None for appid in vercodes }
|
apks = {appid: None for appid in vercodes}
|
||||||
|
|
||||||
# Get the signed apk with the highest vercode
|
# Get the signed apk with the highest vercode
|
||||||
for apkfile in sorted(glob.glob(os.path.join(output_dir, '*.apk'))):
|
for apkfile in sorted(glob.glob(os.path.join(output_dir, '*.apk'))):
|
||||||
|
|
@ -87,7 +87,7 @@ def main():
|
||||||
else:
|
else:
|
||||||
|
|
||||||
apks = {common.apknameinfo(apkfile)[0]: apkfile for apkfile in
|
apks = {common.apknameinfo(apkfile)[0]: apkfile for apkfile in
|
||||||
sorted(glob.glob(os.path.join(output_dir, '*.apk'))) }
|
sorted(glob.glob(os.path.join(output_dir, '*.apk')))}
|
||||||
|
|
||||||
for appid, apk in apks.iteritems():
|
for appid, apk in apks.iteritems():
|
||||||
# Get device list each time to avoid device not found errors
|
# Get device list each time to avoid device not found errors
|
||||||
|
|
@ -97,7 +97,7 @@ def main():
|
||||||
logging.info("Installing %s..." % apk)
|
logging.info("Installing %s..." % apk)
|
||||||
for dev in devs:
|
for dev in devs:
|
||||||
logging.info("Installing %s on %s..." % (apk, dev))
|
logging.info("Installing %s on %s..." % (apk, dev))
|
||||||
p = FDroidPopen(["adb", "-s", dev, "install", apk ])
|
p = FDroidPopen(["adb", "-s", dev, "install", apk])
|
||||||
fail= ""
|
fail= ""
|
||||||
for line in p.stdout.splitlines():
|
for line in p.stdout.splitlines():
|
||||||
if line.startswith("Failure"):
|
if line.startswith("Failure"):
|
||||||
|
|
|
||||||
|
|
@ -122,62 +122,62 @@ class FieldType():
|
||||||
valuetypes = {
|
valuetypes = {
|
||||||
'int': FieldType("Integer",
|
'int': FieldType("Integer",
|
||||||
r'^[1-9][0-9]*$', None,
|
r'^[1-9][0-9]*$', None,
|
||||||
['FlattrID' ],
|
['FlattrID'],
|
||||||
['vercode' ]),
|
['vercode']),
|
||||||
|
|
||||||
'http': FieldType("HTTP link",
|
'http': FieldType("HTTP link",
|
||||||
r'^http[s]?://', None,
|
r'^http[s]?://', None,
|
||||||
["Web Site", "Source Code", "Issue Tracker", "Donate" ], []),
|
["Web Site", "Source Code", "Issue Tracker", "Donate"], []),
|
||||||
|
|
||||||
'bitcoin': FieldType("Bitcoin address",
|
'bitcoin': FieldType("Bitcoin address",
|
||||||
r'^[a-zA-Z0-9]{27,34}$', None,
|
r'^[a-zA-Z0-9]{27,34}$', None,
|
||||||
["Bitcoin" ],
|
["Bitcoin"],
|
||||||
[]),
|
[]),
|
||||||
|
|
||||||
'litecoin': FieldType("Litecoin address",
|
'litecoin': FieldType("Litecoin address",
|
||||||
r'^L[a-zA-Z0-9]{33}$', None,
|
r'^L[a-zA-Z0-9]{33}$', None,
|
||||||
["Litecoin" ],
|
["Litecoin"],
|
||||||
[]),
|
[]),
|
||||||
|
|
||||||
'dogecoin': FieldType("Dogecoin address",
|
'dogecoin': FieldType("Dogecoin address",
|
||||||
r'^D[a-zA-Z0-9]{33}$', None,
|
r'^D[a-zA-Z0-9]{33}$', None,
|
||||||
["Dogecoin" ],
|
["Dogecoin"],
|
||||||
[]),
|
[]),
|
||||||
|
|
||||||
'Bool': FieldType("Boolean",
|
'Bool': FieldType("Boolean",
|
||||||
['Yes', 'No'], None,
|
['Yes', 'No'], None,
|
||||||
["Requires Root" ],
|
["Requires Root"],
|
||||||
[]),
|
[]),
|
||||||
|
|
||||||
'bool': FieldType("Boolean",
|
'bool': FieldType("Boolean",
|
||||||
['yes', 'no'], None,
|
['yes', 'no'], None,
|
||||||
[],
|
[],
|
||||||
['submodules', 'oldsdkloc', 'forceversion', 'forcevercode',
|
['submodules', 'oldsdkloc', 'forceversion', 'forcevercode',
|
||||||
'novcheck' ]),
|
'novcheck']),
|
||||||
|
|
||||||
'Repo Type': FieldType("Repo Type",
|
'Repo Type': FieldType("Repo Type",
|
||||||
['git', 'git-svn', 'svn', 'hg', 'bzr', 'srclib' ], None,
|
['git', 'git-svn', 'svn', 'hg', 'bzr', 'srclib'], None,
|
||||||
["Repo Type" ],
|
["Repo Type"],
|
||||||
[]),
|
[]),
|
||||||
|
|
||||||
'archive': FieldType("Archive Policy",
|
'archive': FieldType("Archive Policy",
|
||||||
r'^[0-9]+ versions$', None,
|
r'^[0-9]+ versions$', None,
|
||||||
["Archive Policy" ],
|
["Archive Policy"],
|
||||||
[]),
|
[]),
|
||||||
|
|
||||||
'antifeatures': FieldType("Anti-Feature",
|
'antifeatures': FieldType("Anti-Feature",
|
||||||
["Ads", "Tracking", "NonFreeNet", "NonFreeDep", "NonFreeAdd", "UpstreamNonFree" ], ',',
|
["Ads", "Tracking", "NonFreeNet", "NonFreeDep", "NonFreeAdd", "UpstreamNonFree"], ',',
|
||||||
["AntiFeatures" ],
|
["AntiFeatures"],
|
||||||
[]),
|
[]),
|
||||||
|
|
||||||
'autoupdatemodes': FieldType("Auto Update Mode",
|
'autoupdatemodes': FieldType("Auto Update Mode",
|
||||||
r"^(Version .+|None)$", None,
|
r"^(Version .+|None)$", None,
|
||||||
["Auto Update Mode" ],
|
["Auto Update Mode"],
|
||||||
[]),
|
[]),
|
||||||
|
|
||||||
'updatecheckmodes': FieldType("Update Check Mode",
|
'updatecheckmodes': FieldType("Update Check Mode",
|
||||||
r"^(Tags|Tags .+|RepoManifest|RepoManifest/.+|RepoTrunk|HTTP|Static|None)$", None,
|
r"^(Tags|Tags .+|RepoManifest|RepoManifest/.+|RepoTrunk|HTTP|Static|None)$", None,
|
||||||
["Update Check Mode" ],
|
["Update Check Mode"],
|
||||||
[])
|
[])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ def update_awsbucket(repo_section):
|
||||||
if upload:
|
if upload:
|
||||||
if options.verbose:
|
if options.verbose:
|
||||||
logging.info(' uploading "' + file_to_upload + '"...')
|
logging.info(' uploading "' + file_to_upload + '"...')
|
||||||
extra = {'acl': 'public-read' }
|
extra = {'acl': 'public-read'}
|
||||||
if file_to_upload.endswith('.sig'):
|
if file_to_upload.endswith('.sig'):
|
||||||
extra['content_type'] = 'application/pgp-signature'
|
extra['content_type'] = 'application/pgp-signature'
|
||||||
elif file_to_upload.endswith('.asc'):
|
elif file_to_upload.endswith('.asc'):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue