mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-16 07:52:35 +03:00
Don't print all metadata reads; Only print when an exception is present
This commit is contained in:
parent
94b083063a
commit
fed04a0429
1 changed files with 5 additions and 3 deletions
|
@ -464,8 +464,6 @@ def parse_metadata(metafile, **kw):
|
||||||
if not isinstance(metafile, file):
|
if not isinstance(metafile, file):
|
||||||
metafile = open(metafile, "r")
|
metafile = open(metafile, "r")
|
||||||
thisinfo['id'] = metafile.name[9:-4]
|
thisinfo['id'] = metafile.name[9:-4]
|
||||||
if kw.get("verbose", False):
|
|
||||||
print "Reading metadata for " + thisinfo['id']
|
|
||||||
else:
|
else:
|
||||||
thisinfo['id'] = None
|
thisinfo['id'] = None
|
||||||
|
|
||||||
|
@ -674,7 +672,11 @@ def write_metadata(dest, app):
|
||||||
def read_metadata(verbose=False, xref=True):
|
def read_metadata(verbose=False, xref=True):
|
||||||
apps = []
|
apps = []
|
||||||
for metafile in sorted(glob.glob(os.path.join('metadata', '*.txt'))):
|
for metafile in sorted(glob.glob(os.path.join('metadata', '*.txt'))):
|
||||||
apps.append(parse_metadata(metafile, verbose=verbose))
|
try:
|
||||||
|
appinfo = parse_metadata(metafile, verbose=verbose)
|
||||||
|
except Exception, e:
|
||||||
|
raise MetaDataException("Problem reading metadata file %s: - %s" % (metafile, str(e)))
|
||||||
|
apps.append(appinfo)
|
||||||
|
|
||||||
if xref:
|
if xref:
|
||||||
# Parse all descriptions at load time, just to ensure cross-referencing
|
# Parse all descriptions at load time, just to ensure cross-referencing
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue