[game-data-packager] 01/01: WantedFile.provides_files: initialize to empty set, not None
Simon McVittie
smcv at debian.org
Sun May 14 13:08:10 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 61bd889a7d62550e9aaa7e9512c1c1e3bf351d9f
Author: Simon McVittie <smcv at debian.org>
Date: Sun May 14 13:52:21 2017 +0100
WantedFile.provides_files: initialize to empty set, not None
Otherwise, iterating over them can lead to this error:
Traceback (most recent call last):
File "tools/check_syntax.py", line 26, in <module>
game.load_file_data()
File "game_data_packager/__init__.py", line 710, in load_file_data
for provided in f.provides_files:
TypeError: 'NoneType' object is not iterable
---
debian/changelog | 8 ++++++++
game_data_packager/data.py | 2 +-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index f6eddfe..8e0a8c3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+game-data-packager (52) UNRELEASED; urgency=medium
+
+ * Enhancements and bug fixes:
+ - Fix a potential crash during data loading by initializing
+ WantedFile.provides_files correctly [smcv]
+
+ -- Simon McVittie <smcv at debian.org> Sun, 14 May 2017 13:52:42 +0100
+
game-data-packager (51) experimental; urgency=medium
* New game support:
diff --git a/game_data_packager/data.py b/game_data_packager/data.py
index 3a52b21..4e11990 100644
--- a/game_data_packager/data.py
+++ b/game_data_packager/data.py
@@ -180,7 +180,7 @@ class WantedFile(HashedFile):
self.license = False
self._look_for = None
self._provides = set()
- self.provides_files = None
+ self.provides_files = set()
self._size = None
self.unpack = None
self.unsuitable = None
--
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