Skip to content

Commit

Permalink
Merge pull request timreibe#344 from sinun98/fixversion
Browse files Browse the repository at this point in the history
fix(Version): Fix print output
  • Loading branch information
sinun98 authored Jun 5, 2021
2 parents 9cc8b20 + 0b44308 commit 7fadbce
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
12 changes: 8 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,12 +488,16 @@ def main():

# Auf aktuelle Version prüfen
try:
update_available()
print("\n")
if not update_available():
print('Du verwendest die aktuellste Version von vaccipy: ' + get_current_version())
else:
print("Du verwendest eine alte Version von vaccipy.\n"
"Bitte installiere die aktuellste Version. Link zum Download:\n"
"https://github.com/iamnotturner/vaccipy/releases/tag/" + get_latest_version())
except:
print("An exception occurred", sys.exc_info()[0])

print("Konnte nicht auf neuste Version geprüft werden", sys.exc_info()[0])

print("\n")
print("Automatische Terminbuchung für den Corona Impfterminservice\n")

print("Vor der Ausführung des Programms ist die Berechtigung zur Impfung zu prüfen.\n"
Expand Down
9 changes: 0 additions & 9 deletions tools/its.py
Original file line number Diff line number Diff line change
Expand Up @@ -791,15 +791,6 @@ def terminsuche(code: str, plz_impfzentren: list, kontakt: dict, PATH: str, zeit
# durchlaufe jede eingegebene PLZ und suche nach Termin
for plz in its.plz_impfzentren:
termin_gefunden, status_code = its.termin_suchen(plz, zeitrahmen)

try:
# Updateprüfung
hasupdate = update_available()

if hasupdate:
its.log.warn("Update verfügbar!")
except Exception as exec:
its.log.warn("Konnte nicht auf neuste Version geprüft werden")

# Durchlauf aller PLZ unterbrechen, wenn Termin gefunden wurde
if termin_gefunden:
Expand Down
4 changes: 0 additions & 4 deletions tools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,8 @@ def update_available():


if latest_version.strip() == current_version.strip():
print('Du verwendest die aktuellste Version von vaccipy: '+current_version)
return False
else:
print("Du verwendest eine alte Version von vaccipy.\n"
"Bitte installiere die aktuellste Version. Link zum Download:\n"
"https://github.com/iamnotturner/vaccipy/releases/tag/" + latest_version)
return True

def get_current_version():
Expand Down

0 comments on commit 7fadbce

Please sign in to comment.