chiark / gitweb /
server: test using config.get() in case dict value is None
authorHans-Christoph Steiner <hans@eds.org>
Wed, 23 Apr 2014 23:52:37 +0000 (19:52 -0400)
committerHans-Christoph Steiner <hans@eds.org>
Thu, 24 Apr 2014 00:10:02 +0000 (20:10 -0400)
commit21769e9f0af1730205268c870119bf8818850b8a
tree746116a14cb7c36a4d65b495b19a93f5f923e633
parentef7c9d89d2c07b0dfe3e63df8fa8378483b34d84
server: test using config.get() in case dict value is None

If a key 'foo' is set to None, `if config.get('foo'):` will be false while
`if 'foo' in config:` will be true.  A None value is not useful here, so
config.get() is the better check.

Thanks to Adam Pritchard for the suggestion.
fdroidserver/server.py