[game-data-packager] 01/04: mirror: fix for current APIs

Simon McVittie smcv at debian.org
Tue Feb 2 22:25:39 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 1940f925954bc6bd8c027edceef84d49e6782fd2
Author: Simon McVittie <smcv at debian.org>
Date:   Tue Feb 2 22:14:54 2016 +0000

    mirror: fix for current APIs
---
 tools/mirror.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/mirror.py b/tools/mirror.py
index 1225544..8b0fe56 100755
--- a/tools/mirror.py
+++ b/tools/mirror.py
@@ -26,13 +26,14 @@
 
 WEBROOT = '/var/www/html'
 KEEP_FREE_SPACE = 250 * 1024 * 1024
-QUITE_LARGE = 10 * 1024 * 1024
 
 import os
 import subprocess
 
-from game_data_packager import (load_games,HashedFile)
+from game_data_packager import (load_games)
 from game_data_packager.build import (choose_mirror)
+from game_data_packager.command_line import (TerminalProgress)
+from game_data_packager.data import (HashedFile)
 
 archives = []
 
@@ -90,7 +91,7 @@ for a in archives:
        exit("%s has the wrong size !!!" % archive)
    print('checking %s ...' % archive)
    hf = HashedFile.from_file(archive, open(archive, 'rb'),
-        size=a['size'], progress=(a['size'] > QUITE_LARGE))
+        size=a['size'], progress=TerminalProgress())
    if a['md5'] and a['md5'] != hf.md5:
        exit("md5 doesn't match for %s !!!" % archive)
    if a['sha1'] and a['sha1'] != hf.sha1:

-- 
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