From 030493c3f4ac334d371ad5b1381b35af145cca5e Mon Sep 17 00:00:00 2001 From: Guilherme Brandt Date: Mon, 18 Feb 2019 22:46:30 -0300 Subject: [PATCH] Fix version check --- god/updater.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/god/updater.py b/god/updater.py index 84ebc6d..071f882 100644 --- a/god/updater.py +++ b/god/updater.py @@ -36,10 +36,11 @@ def check_updates(): cli.info("Encontrado: " + latest_release['tag_name']) - with open(".version", "r") as version_file: - if latest_release['tag_name'] == version_file.readline().strip(): - cli.success("O god está atualizado.") - return + if os.path.isfile(".version"): + with open(".version", "r") as version_file: + if latest_release['tag_name'] == version_file.readline().strip(): + cli.success("O god está atualizado.") + return while True: answer = input("\tAtualizar? [Y/n] ").lower().strip()