[game-data-packager] 01/01: GOG: --list: return empty list instead of None
Alexandre Detiste
detiste-guest at moszumanska.debian.org
Tue Sep 15 10:25:09 UTC 2015
This is an automated email from the git hooks/post-receive script.
detiste-guest pushed a commit to branch master
in repository game-data-packager.
commit 859f06eecbcb2d4761758005297e42a0e885afba
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Tue Sep 15 12:24:01 2015 +0200
GOG: --list: return empty list instead of None
---
game_data_packager/gog.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/game_data_packager/gog.py b/game_data_packager/gog.py
index e481745..4d84226 100644
--- a/game_data_packager/gog.py
+++ b/game_data_packager/gog.py
@@ -28,9 +28,9 @@ class Gog:
if self.available is not None:
return self.available
+ self.available = []
cache = os.path.expanduser('~/.cache/lgogdownloader/gamedetails.json')
if os.path.isfile(cache):
- self.available = []
data = json.load(open(cache, encoding='utf-8'))
for key in data['games']:
self.available.append(key['gamename'])
@@ -42,7 +42,7 @@ class Gog:
universal_newlines=True)
self.available = list.splitlines()
except subprocess.CalledProcessError:
- self.available = []
+ pass
return self.available
--
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