Commit 61bd889a authored by Simon McVittie's avatar Simon McVittie

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
parent 960411ec
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@debian.org> Sun, 14 May 2017 13:52:42 +0100
game-data-packager (51) experimental; urgency=medium
* New game support:
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment