mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-10-08 18:31:07 +03:00
except named exception handling
This commit is contained in:
parent
af38f151a2
commit
5ca182a20d
6 changed files with 10 additions and 10 deletions
|
@ -331,7 +331,7 @@ def resize_icon(iconpath, density):
|
|||
iconpath, oldsize, im.size))
|
||||
im.save(iconpath, "PNG")
|
||||
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
logging.error("Failed resizing {0} - {1}".format(iconpath, e))
|
||||
|
||||
|
||||
|
@ -490,7 +490,7 @@ def scan_apks(apps, apkcache, repodir, knownapks):
|
|||
apk['id'] = re.match(name_pat, line).group(1)
|
||||
apk['versioncode'] = int(re.match(vercode_pat, line).group(1))
|
||||
apk['version'] = re.match(vername_pat, line).group(1)
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
logging.error("Package matching failed: " + str(e))
|
||||
logging.info("Line was: " + line)
|
||||
sys.exit(1)
|
||||
|
@ -615,7 +615,7 @@ def scan_apks(apps, apkcache, repodir, knownapks):
|
|||
os.path.join(get_icon_dir(repodir, density), iconfilename))
|
||||
empty_densities.remove(density)
|
||||
break
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
logging.warn("Failed reading {0} - {1}".format(iconpath, e))
|
||||
|
||||
if apk['icons']:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue