[game-data-packager] 01/05: If look_for is a single string, interpret it as a set of only that string
Simon McVittie
smcv at debian.org
Wed Jun 29 08:27:25 UTC 2016
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 b85db89e61319d0f054bcc0f1d9ee4a19099d1ed
Author: Simon McVittie <smcv at debian.org>
Date: Wed Jun 29 08:35:50 2016 +0100
If look_for is a single string, interpret it as a set of only that string
"look_for: foo" being equivalent to "look_for: [f, o, o]" makes very
little sense.
---
game_data_packager/data.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/game_data_packager/data.py b/game_data_packager/data.py
index bde3d0b..10fb32e 100644
--- a/game_data_packager/data.py
+++ b/game_data_packager/data.py
@@ -219,6 +219,8 @@ class WantedFile(HashedFile):
return set([self.filename.lower(), self.install_as.lower()])
@look_for.setter
def look_for(self, value):
+ if isinstance(value, str):
+ value = (value,)
self._look_for = set(x.lower() for x in value)
@property
--
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