remote try catch in new build tool - file was missing

This commit is contained in:
Kevin Hester
2020-12-10 14:04:19 +08:00
parent 4cbf0a0730
commit 2d4849e0d0
2 changed files with 5 additions and 10 deletions
+4 -9
View File
@@ -3,15 +3,10 @@ Import("projenv")
import configparser
prefsLoc = projenv["PROJECT_DIR"] + "/version.properties"
print(f"Preferences in {prefsLoc}")
try:
config = configparser.RawConfigParser()
config.read(prefsLoc)
version = dict(config.items('VERSION'))
verStr = "{}.{}.{}".format(version["major"], version["minor"], version["build"])
except:
print("Can't read preferences, using 0.0.0")
verStr = "0.0.0"
config = configparser.RawConfigParser()
config.read(prefsLoc)
version = dict(config.items('VERSION'))
verStr = "{}.{}.{}".format(version["major"], version["minor"], version["build"])
print(f"Using meshtastic platform-custom.py, firmare version {verStr}")