From 8ad28efa5bfd2718af9b932a45631e7eec98098f Mon Sep 17 00:00:00 2001 From: Jean-Michel <jmichel@google.com> Date: Fri, 21 Feb 2020 14:41:17 +0100 Subject: [PATCH] Fix errors in deploy script. --- deploy.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/deploy.py b/deploy.py index 8de9f86..192b1dc 100755 --- a/deploy.py +++ b/deploy.py @@ -25,6 +25,7 @@ import os import shutil import subprocess import sys +from tockloader.exceptions import TockLoaderException from tockloader import tab, tbfh, tockloader # This structure allows us in the future to also support out-of-tree boards. @@ -104,7 +105,7 @@ class RemoveConstAction(argparse.Action): else: items = copy.copy(items) if self.const in items: - self.remove(self.const) + items.remove(self.const) setattr(namespace, self.dest, items) @@ -234,7 +235,7 @@ class OpenSKInstaller(object): tabs = [tab.TAB(tab_filename)] try: tock.install(tabs, replace="yes", erase=args.erase) - except tockloader.exceptions.TockLoaderException as e: + except TockLoaderException as e: fatal("Couldn't install Tock application {}: {}".format( self.args.application, str(e))) @@ -252,7 +253,7 @@ class OpenSKInstaller(object): tock.open(args) try: tock.flash_binary(padding, args.address) - except tockloader.exceptions.TockLoaderException as e: + except TockLoaderException as e: fatal("Couldn't install padding: {}".format(str(e))) def clear_apps(self): @@ -263,7 +264,7 @@ class OpenSKInstaller(object): tock.open(args) try: tock.erase_apps(False) - except tockloader.exceptions.TockLoaderException as e: + except TockLoaderException as e: # Erasing apps is not critical info(("A non-critical error occured while erasing " "apps: {}".format(str(e)))) -- GitLab