[game-data-packager] 07/51: GameData: Reduce size of to_data(expand=False)
Simon McVittie
smcv at debian.org
Fri Dec 29 01:23:34 UTC 2017
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch master
in repository game-data-packager.
commit 54c913033785777b8be9d8a07b91cb7ead7c3330
Author: Simon McVittie <smcv at debian.org>
Date: Tue Dec 26 16:55:43 2017 +0000
GameData: Reduce size of to_data(expand=False)
Signed-off-by: Simon McVittie <smcv at debian.org>
---
game_data_packager/__init__.py | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py
index feae963..e34dbd0 100644
--- a/game_data_packager/__init__.py
+++ b/game_data_packager/__init__.py
@@ -380,17 +380,18 @@ class GameData(object):
if packages:
ret['packages'] = packages
- for k in (
- 'known_filenames',
- 'known_md5s',
- 'known_sha1s',
- 'known_sha256s',
- 'known_sizes',
- 'providers',
- ):
- v = getattr(self, k)
- if v:
- ret[k] = sort_set_values(v)
+ if expand:
+ for k in (
+ 'known_filenames',
+ 'known_md5s',
+ 'known_sha1s',
+ 'known_sha256s',
+ 'known_sizes',
+ 'providers',
+ ):
+ v = getattr(self, k)
+ if v:
+ ret[k] = sort_set_values(v)
unknown_md5s = set()
unknown_sha1s = set()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git
More information about the Pkg-games-commits
mailing list