Travis didn't like my last commit

philcrump-phil-add-ntp
Marek Ventur 2018-08-25 22:56:35 +01:00
parent 0f168e6053
commit 98f5a0507d
1 changed files with 8 additions and 7 deletions

View File

@ -49,15 +49,9 @@ Common parameters
-s --storage : path to flash storage
"""
import sys
try:
import serial
except Exception as e:
print("Please install pyserial first: https://pyserial.readthedocs.io/en/latest/pyserial.html")
sys.exit(1)
import glob
import sync, firmware_update, wifi, pyboard_util
import sync, firmware_update, wifi, pyboard_util, sys
from resources import *
def main():
@ -78,6 +72,13 @@ def main():
path = sync.get_root()
run_tests = command == "test"
if command not in ["validate"]:
try:
import serial
except Exception as e:
print("Please install pyserial first: https://pyserial.readthedocs.io/en/latest/pyserial.html")
sys.exit(1)
if command == "firmware-update":
firmware_update.firmware_update(args.verbose)