mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-14 11:00:10 +01:00
fix exception handling in dscanner and update.py
This commit is contained in:
parent
c45c4041a5
commit
c15f02ed68
@ -302,7 +302,7 @@ class DockerDriver(object):
|
|||||||
msg = msg.format(c, t, int(c / t * 100), j)
|
msg = msg.format(c, t, int(c / t * 100), j)
|
||||||
sys.stdout.write(msg)
|
sys.stdout.write(msg)
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
except:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
print("\nDONE!\n")
|
print("\nDONE!\n")
|
||||||
|
|
||||||
|
@ -300,8 +300,8 @@ def update_wiki(apps, sortedids, apks):
|
|||||||
try:
|
try:
|
||||||
newpage = site.Pages[pagename]
|
newpage = site.Pages[pagename]
|
||||||
newpage.save(text, summary='Auto-created')
|
newpage.save(text, summary='Auto-created')
|
||||||
except:
|
except Exception as e:
|
||||||
logging.error("...FAILED to create page '{0}'".format(pagename))
|
logging.error("...FAILED to create page '{0}': {1}".format(pagename, e))
|
||||||
|
|
||||||
# Purge server cache to ensure counts are up to date
|
# Purge server cache to ensure counts are up to date
|
||||||
site.pages['Repository Maintenance'].purge()
|
site.pages['Repository Maintenance'].purge()
|
||||||
@ -925,8 +925,8 @@ def scan_apk(apkcache, apkfilename, repodir, knownapks, use_date_from_apk):
|
|||||||
f.write(get_icon_bytes(apkzip, iconsrc))
|
f.write(get_icon_bytes(apkzip, iconsrc))
|
||||||
apk['icons'][density] = iconfilename
|
apk['icons'][density] = iconfilename
|
||||||
|
|
||||||
except:
|
except Exception as e:
|
||||||
logging.warn("Error retrieving icon file")
|
logging.warn("Error retrieving icon file: %s" % (e))
|
||||||
del apk['icons'][density]
|
del apk['icons'][density]
|
||||||
del apk['icons_src'][density]
|
del apk['icons_src'][density]
|
||||||
empty_densities.append(density)
|
empty_densities.append(density)
|
||||||
@ -982,8 +982,8 @@ def scan_apk(apkcache, apkfilename, repodir, knownapks, use_date_from_apk):
|
|||||||
im.thumbnail((size, size), Image.ANTIALIAS)
|
im.thumbnail((size, size), Image.ANTIALIAS)
|
||||||
im.save(iconpath, "PNG")
|
im.save(iconpath, "PNG")
|
||||||
empty_densities.remove(density)
|
empty_densities.remove(density)
|
||||||
except:
|
except Exception as e:
|
||||||
logging.warning("Invalid image file at %s" % last_iconpath)
|
logging.warning("Invalid image file at %s: %s" % (last_iconpath, e))
|
||||||
finally:
|
finally:
|
||||||
if fp:
|
if fp:
|
||||||
fp.close()
|
fp.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user