[game-data-packager] 22/51: WantedFile.to_data: Only include HashedFile attributes if expand=True
Simon McVittie
smcv at debian.org
Fri Dec 29 01:23:35 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 504c45817b99b31949441f5a316e169a2cf556b1
Author: Simon McVittie <smcv at debian.org>
Date: Wed Dec 27 16:41:51 2017 +0000
WantedFile.to_data: Only include HashedFile attributes if expand=True
Signed-off-by: Simon McVittie <smcv at debian.org>
---
game_data_packager/data.py | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/game_data_packager/data.py b/game_data_packager/data.py
index 99eab49..ed58129 100644
--- a/game_data_packager/data.py
+++ b/game_data_packager/data.py
@@ -284,7 +284,6 @@ class WantedFile(HashedFile):
for k in (
'download',
- 'size',
'unsuitable',
'unpack',
):
@@ -295,6 +294,17 @@ class WantedFile(HashedFile):
else:
ret[k] = v
+ if expand:
+ for k in (
+ 'md5',
+ 'sha1',
+ 'sha256',
+ 'size',
+ ):
+ v = getattr(self, k)
+ if v is not None:
+ ret[k] = v
+
for k in (
'distinctive_size',
'doc',
--
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