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 8eada49c941fdd886774bc0dace58155b1f93bae Author: Simon McVittie <[email protected]> Date: Wed Nov 29 17:20:04 2017 +0000 PackagingTask: Don't crash if all download attempts fail Signed-off-by: Simon McVittie <[email protected]> --- game_data_packager/build.py | 5 ++++- game_data_packager/download.py | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/game_data_packager/build.py b/game_data_packager/build.py index 933235b..881eaf7 100644 --- a/game_data_packager/build.py +++ b/game_data_packager/build.py @@ -35,7 +35,7 @@ except ImportError: BACKPORT_SUFFIX = '' from .data import (HashedFile) -from .download import (Downloader, OutOfSpace) +from .download import (Downloader, NotDownloadable, OutOfSpace) from .gog import GOG from .packaging import (get_native_packaging_system) from .paths import (DATADIR) @@ -702,6 +702,9 @@ class PackagingTask(object): try: path, hasher = self.downloader.download(wanted, dest) + except NotDownloadable: + # download() already issued a warning, do nothing + pass except OutOfSpace: return FillResult.IMPOSSIBLE else: diff --git a/game_data_packager/download.py b/game_data_packager/download.py index d9a9df5..4842f94 100644 --- a/game_data_packager/download.py +++ b/game_data_packager/download.py @@ -29,6 +29,10 @@ logging.basicConfig() logger = logging.getLogger(__name__) +class NotDownloadable(Exception): + pass + + class OutOfSpace(Exception): pass @@ -151,7 +155,7 @@ class Downloader: if tmp is not None: os.remove(tmp) else: - return None, None + raise NotDownloadable if __name__ == '__main__': # Usage: -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git _______________________________________________ Pkg-games-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

