chiark / gitweb /
consolidate all post-parse metadata checks
authorHans-Christoph Steiner <hans@eds.org>
Thu, 23 Jul 2015 22:09:57 +0000 (15:09 -0700)
committerHans-Christoph Steiner <hans@eds.org>
Tue, 1 Sep 2015 09:39:51 +0000 (11:39 +0200)
commit0425788b7d760d29fb3e39097a9ca5a4d2b7987f
treebedd34d070d715adc6a3d5af525aa1d5e48c3cc9
parent014df8426f55cf66d6b4982bec23698d45e91584
consolidate all post-parse metadata checks

This puts all of the needed post parsing checks on the metadata into a
single method that is used by all parsing methods (.txt, JSON, XML, YAML).
This provides the single place to normalize the internal representation of
the metadata.

It would be good to also change the internal representation to use more Python
bool/int types so that less post parsing is needed for JSON, XML, and YAML.

The SMSSecure test .pickle was changed to account for the use of lstrip()
and rstrip() on all 'script' types.

This also changes the example JSON to use ints for versionCodes
fdroidserver/metadata.py
tests/metadata/org.adaway.json
tests/metadata/org.adaway.pickle
tests/metadata/org.smssecure.smssecure.pickle