diff options
author | Agustin Zubiaga <aguz@sugarlabs.org> | 2012-06-20 03:46:35 (GMT) |
---|---|---|
committer | Agustin Zubiaga <aguz@sugarlabs.org> | 2012-06-20 03:46:35 (GMT) |
commit | 39a82dfa2d59a9751263cf3578335026e0beef7a (patch) | |
tree | 305a06d688a55dad559461ab3e581761fcc65240 /utils.py | |
parent | c548bbea4b71fb91875da4fcf993abb303321048 (diff) |
Fixing try again bugs
Diffstat (limited to 'utils.py')
-rw-r--r-- | utils.py | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -31,6 +31,8 @@ LIST_DOWNLOAD = "http://www.fing.edu.uy/~aaguiar/files/store.lst" LIST_PATH = os.path.join(activity.get_activity_root(), 'data', 'store.lst') TMP_DIR = os.path.join(activity.get_activity_root(), "tmp") +downloading = False + # Logging _logger = logging.getLogger('install-activity') _logger.setLevel(logging.DEBUG) @@ -41,9 +43,11 @@ def get_logger(): return _logger -def update_list(func, search_entry, label, try_again_btn): +def update_list(): """Download the latest list version""" + global downloading try: + downloading = True remote_file = urllib.urlopen(LIST_DOWNLOAD) _file = open(LIST_PATH, 'w') _file.write(remote_file.read()) @@ -52,7 +56,7 @@ def update_list(func, search_entry, label, try_again_btn): except: pass - func(search_entry, label, try_again_btn) + downloading = False def get_store_list(): |