[game-data-packager] 02/04: GOG:don't pester about foreign languages, move archive after use
Alexandre Detiste
detiste-guest at moszumanska.debian.org
Thu Sep 17 08:10:13 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 224ad00eb8592f39380360151d07a752077dea34
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Thu Sep 17 09:22:25 2015 +0200
GOG:don't pester about foreign languages, move archive after use
---
game_data_packager/__init__.py | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py
index d61bf9a..2e099ad 100644
--- a/game_data_packager/__init__.py
+++ b/game_data_packager/__init__.py
@@ -2708,7 +2708,10 @@ class GameData(object):
# download game if it is already owned by user's GOG.com account
# user must have used 'lgogdownloader' at least once to make this work
elif gog_id and which('innoextract') and gog_id in GOG.owned_games():
- logger.info('%s will be downloaded with lgogdownloader', package.name)
+ if lang_score(package.lang) == 0:
+ logger.debug('%s can be downloaded with lgogdownloader', package.name)
+ else:
+ logger.info('%s can be downloaded with lgogdownloader', package.name)
possible.add(package)
possible_with_lgogdownloader.add(package.name)
else:
@@ -2864,16 +2867,17 @@ class GameData(object):
'--platform-priority', 'linux,windows',
'--language', package.lang,
'--game', '^' + gog_id + '$'])
+ archive = None
for dirpath, dirnames, filenames in os.walk(tmpdir):
for fn in filenames:
archive = os.path.join(dirpath, fn)
self.consider_file(archive, True)
- if self.save_downloads:
- shutil.move(archive, self.save_downloads)
# recheck file status
if self.fill_gaps(package, log=True, download=True,
recheck=True) is not FillResult.IMPOSSIBLE:
ready.add(package)
+ if archive and self.save_downloads:
+ shutil.move(archive, self.save_downloads)
except subprocess.CalledProcessError:
pass
elif result is FillResult.DOWNLOAD_NEEDED and not download:
--
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