From f6f60fd10d6e88a92f087c4c927671cd2b21612a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Mon, 25 Jun 2018 12:52:22 +0200 Subject: [PATCH] Remove module option from OTA Manager --- code/ota.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/code/ota.py b/code/ota.py index c1c72fba..17747b5e 100755 --- a/code/ota.py +++ b/code/ota.py @@ -121,7 +121,7 @@ def get_empty_board(): """ Returns the empty structure of a board to flash """ - board = {'board': '', 'ip': '', 'size': 0, 'auth': '', 'flags': '', 'modules': ''} + board = {'board': '', 'ip': '', 'size': 0, 'auth': '', 'flags': ''} return board def get_board_by_index(index): @@ -230,8 +230,8 @@ def store(device, env): def run(device, env): print("Building and flashing image over-the-air...") - command = "ESPURNA_IP=\"%s\" ESPURNA_BOARD=\"%s\" ESPURNA_AUTH=\"%s\" ESPURNA_FLAGS=\"%s\" WEBUI_MODULES=\"%s\" platformio run --silent --environment %s -t upload" - command = command % (device['ip'], device['board'], device['auth'], device['flags'], device['modules'], env) + command = "ESPURNA_IP=\"%s\" ESPURNA_BOARD=\"%s\" ESPURNA_AUTH=\"%s\" ESPURNA_FLAGS=\"%s\" platformio run --silent --environment %s -t upload" + command = command % (device['ip'], device['board'], device['auth'], device['flags'], env) subprocess.check_call(command, shell=True) store(device, env) @@ -245,7 +245,6 @@ if __name__ == '__main__': parser.add_argument("-f", "--flash", help="flash device", default=0, action='count') parser.add_argument("-o", "--flags", help="extra flags", default='') parser.add_argument("-p", "--password", help="auth password", default='') - parser.add_argument("-m", "--modules", help="webui modules", default='') parser.add_argument("-s", "--sort", help="sort devices list by field", default='hostname') parser.add_argument("-y", "--yes", help="do not ask for confirmation", default=0, action='count') parser.add_argument("hostnames", nargs='*', help="Hostnames to update") @@ -289,7 +288,6 @@ if __name__ == '__main__': if board: board['auth'] = args.password board['flags'] = args.flags - board['modules'] = args.modules queue.append(board) # If no boards ask the user @@ -298,7 +296,6 @@ if __name__ == '__main__': if board: board['auth'] = args.password or input("Authorization key of the device to flash: ") board['flags'] = args.flags or input("Extra flags for the build: ") - board['modules'] = args.modules or input("WebUI modules to build: ") queue.append(board) # If still no boards quit @@ -321,7 +318,6 @@ if __name__ == '__main__': print("BOARD = %s" % board['board']) print("AUTH = %s" % board['auth']) print("FLAGS = %s" % board['flags']) - print("MODULES = %s" % board['modules']) print("ENV = %s" % env) response = True