[Scummvm-git-logs] scummvm-icons master -> 3ae0e7c619e96669e7a62b1da3dd529a585ef2e8
GandalfTheWhite80
noreply at scummvm.org
Tue Mar 29 10:21:10 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm-icons' repo located at https://github.com/scummvm/scummvm-icons .
Summary:
3ae0e7c619 ICONS: fixed pylint warnings
Commit: 3ae0e7c619e96669e7a62b1da3dd529a585ef2e8
https://github.com/scummvm/scummvm-icons/commit/3ae0e7c619e96669e7a62b1da3dd529a585ef2e8
Author: Stefan (71585967+GandalfTheWhite80 at users.noreply.github.com)
Date: 2022-03-29T12:20:59+02:00
Commit Message:
ICONS: fixed pylint warnings
Changed paths:
gen-set.py
diff --git a/gen-set.py b/gen-set.py
index 91ae3cf..8243499 100644
--- a/gen-set.py
+++ b/gen-set.py
@@ -38,13 +38,15 @@ from pathlib import Path
from typing import Tuple, final, Set, AnyStr, List
from zipfile import ZipFile
+MIN_PYTHON: final = (3, 8)
+
URLHEAD: final = "https://docs.google.com/spreadsheets/d/e/2PACX-1vQamumX0p-DYQa5Umi3RxX-pHM6RZhAj1qvUP0jTmaqutN9FwzyriRSXlO9rq6kR60pGIuPvCDzZL3s/pub?output=tsv"
# filename/root gid element name
-GUIDS: final = {'games' : ('1946612063', 'game'),
- 'engines' : ('0', 'engine'),
- 'companies' : ('226191984', 'company'),
- 'series' : ('1095671818', 'serie')
+GUIDS: final = {'games': ('1946612063', 'game'),
+ 'engines': ('0', 'engine'),
+ 'companies': ('226191984', 'company'),
+ 'series': ('1095671818', 'serie')
}
URL_ICONS_LIST: final = 'https://downloads.scummvm.org/frs/icons/LIST'
@@ -414,6 +416,8 @@ def run_git(*git_args) -> List[AnyStr]:
###########
+if sys.version_info < MIN_PYTHON:
+ sys.exit(f"Python {MIN_PYTHON[0]}.{MIN_PYTHON[1]} or later is required.\n")
# check args / get date
argParser = argparse.ArgumentParser(usage='%(prog)s [lastUpdate]')
@@ -422,14 +426,15 @@ args = argParser.parse_args()
# optional param, if not present fetch last_update from the LIST file
if 'lastUpdate' in args:
- last_update = datetime.strptime(args.lastUpdate, '%Y%m%d')
- listfile_entries = {}
- last_hash = ""
- print('using provided inputDate: ' + last_update.strftime(DATE_FORMAT) + '\n')
+ arg_last_update = datetime.strptime(args.lastUpdate, '%Y%m%d')
+ print('using provided inputDate: ' + arg_last_update.strftime(DATE_FORMAT) + '\n')
+
+ # we have to read the LIST later (if needed)
+ main(arg_last_update, "", [])
+
else:
- last_hash, listfile_entries = get_listfile_lasthash()
- last_update = None
- print('using last hash from ' + LIST_NAME + ': ' + last_hash + '\n')
+ arg_last_hash, arg_listfile_entries = get_listfile_lasthash()
+ print('using last hash from ' + LIST_NAME + ': ' + arg_last_hash + '\n')
-# listfile_entries as param, no need the read the LIST file twice
-main(last_update, last_hash, listfile_entries)
+ # listfile_entries as param, no need the read the LIST file twice
+ main(None, arg_last_hash, arg_listfile_entries)
More information about the Scummvm-git-logs
mailing list