mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-10-09 02:41:06 +03:00
Do some warnings properly
This commit is contained in:
parent
0b6faa5f22
commit
ec0de6b370
1 changed files with 10 additions and 10 deletions
|
@ -295,7 +295,7 @@ def resize_icon(iconpath, density):
|
||||||
logging.debug("%s is small enough: %s" % im.size)
|
logging.debug("%s is small enough: %s" % im.size)
|
||||||
|
|
||||||
except Exception,e:
|
except Exception,e:
|
||||||
logging.info("WARNING: Failed resizing {0} - {1}".format(iconpath, e))
|
logging.warn("Failed resizing {0} - {1}".format(iconpath, e))
|
||||||
|
|
||||||
def resize_all_icons(repodirs):
|
def resize_all_icons(repodirs):
|
||||||
"""Resize all icons that exceed the max size
|
"""Resize all icons that exceed the max size
|
||||||
|
@ -423,12 +423,12 @@ def scan_apks(apps, apkcache, repodir, knownapks):
|
||||||
thisinfo['features'].append(perm)
|
thisinfo['features'].append(perm)
|
||||||
|
|
||||||
if not 'sdkversion' in thisinfo:
|
if not 'sdkversion' in thisinfo:
|
||||||
logging.info(" WARNING: no SDK version information found")
|
logging.warn("no SDK version information found")
|
||||||
thisinfo['sdkversion'] = 0
|
thisinfo['sdkversion'] = 0
|
||||||
|
|
||||||
# Check for debuggable apks...
|
# Check for debuggable apks...
|
||||||
if common.isApkDebuggable(apkfile, config):
|
if common.isApkDebuggable(apkfile, config):
|
||||||
logging.info("WARNING: {0} is debuggable... {1}".format(apkfile, line))
|
logging.warn("{0} is debuggable... {1}".format(apkfile, line))
|
||||||
|
|
||||||
# Calculate the sha256...
|
# Calculate the sha256...
|
||||||
sha = hashlib.sha256()
|
sha = hashlib.sha256()
|
||||||
|
@ -476,7 +476,7 @@ def scan_apks(apps, apkcache, repodir, knownapks):
|
||||||
thisinfo['icons'][density] = iconfilename
|
thisinfo['icons'][density] = iconfilename
|
||||||
|
|
||||||
except:
|
except:
|
||||||
logging.info("WARNING: Error retrieving icon file")
|
logging.warn("Error retrieving icon file")
|
||||||
del thisinfo['icons'][density]
|
del thisinfo['icons'][density]
|
||||||
del thisinfo['icons_src'][density]
|
del thisinfo['icons_src'][density]
|
||||||
empty_densities.append(density)
|
empty_densities.append(density)
|
||||||
|
@ -501,7 +501,7 @@ def scan_apks(apps, apkcache, repodir, knownapks):
|
||||||
empty_densities.remove(density)
|
empty_densities.remove(density)
|
||||||
break
|
break
|
||||||
except Exception,e:
|
except Exception,e:
|
||||||
logging.info("WARNING: Failed reading {0} - {1}".format(iconpath, e))
|
logging.warn("Failed reading {0} - {1}".format(iconpath, e))
|
||||||
|
|
||||||
if thisinfo['icons']:
|
if thisinfo['icons']:
|
||||||
thisinfo['icon'] = iconfilename
|
thisinfo['icon'] = iconfilename
|
||||||
|
@ -526,7 +526,7 @@ def scan_apks(apps, apkcache, repodir, knownapks):
|
||||||
try:
|
try:
|
||||||
im = Image.open(last_iconpath)
|
im = Image.open(last_iconpath)
|
||||||
except:
|
except:
|
||||||
logging.info("WARNING: Invalid image file at %s" % last_iconpath)
|
logging.warn("Invalid image file at %s" % last_iconpath)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
size = dpi_to_px(density)
|
size = dpi_to_px(density)
|
||||||
|
@ -951,17 +951,17 @@ def main():
|
||||||
if added:
|
if added:
|
||||||
app['added'] = added
|
app['added'] = added
|
||||||
else:
|
else:
|
||||||
logging.info("WARNING: Don't know when " + app['id'] + " was added")
|
logging.warn("Don't know when " + app['id'] + " was added")
|
||||||
if lastupdated:
|
if lastupdated:
|
||||||
app['lastupdated'] = lastupdated
|
app['lastupdated'] = lastupdated
|
||||||
else:
|
else:
|
||||||
logging.info("WARNING: Don't know when " + app['id'] + " was last updated")
|
logging.warn("Don't know when " + app['id'] + " was last updated")
|
||||||
|
|
||||||
if bestver == 0:
|
if bestver == 0:
|
||||||
if app['Name'] is None:
|
if app['Name'] is None:
|
||||||
app['Name'] = app['id']
|
app['Name'] = app['id']
|
||||||
app['icon'] = None
|
app['icon'] = None
|
||||||
logging.info("WARNING: Application " + app['id'] + " has no packages")
|
logging.warn("Application " + app['id'] + " has no packages")
|
||||||
else:
|
else:
|
||||||
if app['Name'] is None:
|
if app['Name'] is None:
|
||||||
app['Name'] = bestapk['name']
|
app['Name'] = bestapk['name']
|
||||||
|
@ -994,7 +994,7 @@ def main():
|
||||||
f.close()
|
f.close()
|
||||||
logging.info("Generated skeleton metadata for " + apk['id'])
|
logging.info("Generated skeleton metadata for " + apk['id'])
|
||||||
else:
|
else:
|
||||||
logging.info("WARNING: " + apk['apkname'] + " (" + apk['id'] + ") has no metadata")
|
logging.warn(apk['apkname'] + " (" + apk['id'] + ") has no metadata")
|
||||||
logging.info(" " + apk['name'] + " - " + apk['version'])
|
logging.info(" " + apk['name'] + " - " + apk['version'])
|
||||||
|
|
||||||
if len(repodirs) > 1:
|
if len(repodirs) > 1:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue