diff options
Diffstat (limited to 'modpackman.py')
-rwxr-xr-x | modpackman.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/modpackman.py b/modpackman.py index e5e5fdc..802ba7a 100755 --- a/modpackman.py +++ b/modpackman.py @@ -111,9 +111,12 @@ def apply_updates(): def check_updates(mods, version_file, version=(2, 0, 0)): pack_version = util.get_version_from_file(version_file) print("Checking for updates to version " + str(pack_version) + "...") + pack_lock = RawConfigParser() + pack_lock.read('pack-lock.ini') latest = [(k, mods[k]) for k in mods.keys()] - old = util.read_file(version_file) - old_urls = [mod[2] for mod in old] + old_urls = [] + for mod in pack_lock['mod_versions'].keys(): + old_urls.append(pack_lock['mod_versions'][mod].split(',')[1]) num_updates = 0 print("Checking updates...") @@ -164,7 +167,7 @@ if __name__ == "__main__": elif args.command == "apply_updates": apply_updates() elif args.command == "check_updates": - check_updates(config['mods'], "version.txt", config['pack']["game_version"]) + check_updates(config['mods'], "pack-lock.ini", config['pack']["game_version"]) else: print("Error: command \"" + args.command + "\" does not exist") parser.print_help() |