[game-data-packager] 41/51: Package.to_data: Survive if a file is somehow not recognised
Simon McVittie
smcv at debian.org
Fri Dec 29 01:23:37 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 d0929578c6a7438a3b83c491312bf6f3b521dd75
Author: Simon McVittie <smcv at debian.org>
Date: Thu Dec 28 20:30:30 2017 +0000
Package.to_data: Survive if a file is somehow not recognised
Signed-off-by: Simon McVittie <smcv at debian.org>
---
game_data_packager/data.py | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/game_data_packager/data.py b/game_data_packager/data.py
index 32e15d2..a1b9312 100644
--- a/game_data_packager/data.py
+++ b/game_data_packager/data.py
@@ -930,17 +930,20 @@ class Package(object):
for name in self.optional:
if name in groups:
f = groups[name]
- else:
+ elif name in files:
f = files[name]
+ else:
+ # can't distinguish
+ f = None
- if f.license:
+ if f is not None and f.license:
licenses.add(f.name)
- if f.doc:
+ if f is not None and f.doc:
docs.add(f.name)
- if not f.doc and not f.license:
- optional.add(f.name)
+ if f is None or not (f.doc or f.license):
+ optional.add(name)
else:
# can't distinguish between docs, licenses and others
--
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