mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-16 16:02:33 +03:00
Fix all pep8 warnings
This commit is contained in:
parent
8568805866
commit
3829896a8a
3 changed files with 9 additions and 12 deletions
|
@ -1812,13 +1812,10 @@ def compare_apks(apk1, apk2, tmp_dir):
|
||||||
return("Failed to unpack " + apk2)
|
return("Failed to unpack " + apk2)
|
||||||
|
|
||||||
p = FDroidPopen(['diff', '-r', 'this_apk', 'that_apk'], cwd=tmp_dir,
|
p = FDroidPopen(['diff', '-r', 'this_apk', 'that_apk'], cwd=tmp_dir,
|
||||||
output=False)
|
output=False)
|
||||||
lines = p.output.splitlines()
|
lines = p.output.splitlines()
|
||||||
if len(lines) != 1 or 'META-INF' not in lines[0]:
|
if len(lines) != 1 or 'META-INF' not in lines[0]:
|
||||||
return("Unexpected diff output - " + p.output)
|
return("Unexpected diff output - " + p.output)
|
||||||
|
|
||||||
# If we get here, it seems like they're the same!
|
# If we get here, it seems like they're the same!
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -113,9 +113,9 @@ def main():
|
||||||
|
|
||||||
# There ought to be valid metadata for this app, otherwise why are we
|
# There ought to be valid metadata for this app, otherwise why are we
|
||||||
# trying to publish it?
|
# trying to publish it?
|
||||||
if not appid in allapps:
|
if appid not in allapps:
|
||||||
logging.error("Unexpected {0} found in unsigned directory"
|
logging.error("Unexpected {0} found in unsigned directory"
|
||||||
.format(apkfilename))
|
.format(apkfilename))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
app = allapps[appid]
|
app = allapps[appid]
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ def main():
|
||||||
break
|
break
|
||||||
if not versionname:
|
if not versionname:
|
||||||
logging.error("...no defined build for version code {0}"
|
logging.error("...no defined build for version code {0}"
|
||||||
.format(vercode))
|
.format(vercode))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Figure out where the developer's binary is supposed to come from...
|
# Figure out where the developer's binary is supposed to come from...
|
||||||
|
@ -147,14 +147,14 @@ def main():
|
||||||
p = FDroidPopen(['wget', '-nv', url], cwd=tmp_dir)
|
p = FDroidPopen(['wget', '-nv', url], cwd=tmp_dir)
|
||||||
if p.returncode != 0 or not os.path.exists(srcapk):
|
if p.returncode != 0 or not os.path.exists(srcapk):
|
||||||
logging.error("...failed to retrieve " + url +
|
logging.error("...failed to retrieve " + url +
|
||||||
" - publish skipped")
|
" - publish skipped")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Compare our unsigned one with the downloaded one...
|
# Compare our unsigned one with the downloaded one...
|
||||||
compare_result = common.compare_apks(srcapk, apkfile, tmp_dir)
|
compare_result = common.compare_apks(srcapk, apkfile, tmp_dir)
|
||||||
if compare_result:
|
if compare_result:
|
||||||
logging.error("...verfication failed - publish skipped : "
|
logging.error("...verfication failed - publish skipped : "
|
||||||
+ compare_result)
|
+ compare_result)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Success! So move the downloaded file to the repo...
|
# Success! So move the downloaded file to the repo...
|
||||||
|
|
|
@ -83,9 +83,9 @@ def main():
|
||||||
raise FDroidException("Failed to get " + apkfilename)
|
raise FDroidException("Failed to get " + apkfilename)
|
||||||
|
|
||||||
compare_result = common.compare_apks(
|
compare_result = common.compare_apks(
|
||||||
os.path.join(unsigned_dir, apkfilename),
|
os.path.join(unsigned_dir, apkfilename),
|
||||||
remoteapk,
|
remoteapk,
|
||||||
tmp_dir)
|
tmp_dir)
|
||||||
if compare_result:
|
if compare_result:
|
||||||
raise FDroidException(compare_result)
|
raise FDroidException(compare_result)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue