zu alte Simbriefpläne werden abgelehnt
This commit is contained in:
parent
49f095346f
commit
83865e0eb8
1 changed files with 9 additions and 1 deletions
|
|
@ -12,6 +12,7 @@ import shutil
|
|||
import logging
|
||||
from logging.handlers import RotatingFileHandler
|
||||
from version import VERSION
|
||||
import time
|
||||
|
||||
import subprocess
|
||||
|
||||
|
|
@ -376,6 +377,13 @@ def Simbriefimport():
|
|||
data = resp.json()
|
||||
general = data.get("general", {})
|
||||
origin = data.get("origin", {})
|
||||
a = int((data['params']['time_generated']))
|
||||
b = datetime.now().timestamp()
|
||||
c = b -a
|
||||
if c > 4500:
|
||||
logging.error("Dein SimBrief Plan ist zu alt!")
|
||||
input("Enter drücken zum Fortfahren...")
|
||||
sys.exit()
|
||||
|
||||
origin_name = start_name(origin["icao_code"])
|
||||
origin_icao = origin["icao_code"]
|
||||
|
|
@ -574,7 +582,7 @@ ordnerneu.mkdir(exist_ok=True)
|
|||
logging.info("--------------------------------------------------")
|
||||
logging.info("START .txt Erzeugung ")
|
||||
logging.info("--------------------------------------------------")
|
||||
debug = True
|
||||
debug = False
|
||||
if debug == False:
|
||||
metarCabin = METAR()
|
||||
metar = metarCabin.choices[0].message.content
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue