Fix errors in deploy script.
This commit is contained in:
@@ -25,6 +25,7 @@ import os
|
|||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
from tockloader.exceptions import TockLoaderException
|
||||||
from tockloader import tab, tbfh, tockloader
|
from tockloader import tab, tbfh, tockloader
|
||||||
|
|
||||||
# This structure allows us in the future to also support out-of-tree boards.
|
# This structure allows us in the future to also support out-of-tree boards.
|
||||||
@@ -104,7 +105,7 @@ class RemoveConstAction(argparse.Action):
|
|||||||
else:
|
else:
|
||||||
items = copy.copy(items)
|
items = copy.copy(items)
|
||||||
if self.const in items:
|
if self.const in items:
|
||||||
self.remove(self.const)
|
items.remove(self.const)
|
||||||
setattr(namespace, self.dest, items)
|
setattr(namespace, self.dest, items)
|
||||||
|
|
||||||
|
|
||||||
@@ -234,7 +235,7 @@ class OpenSKInstaller(object):
|
|||||||
tabs = [tab.TAB(tab_filename)]
|
tabs = [tab.TAB(tab_filename)]
|
||||||
try:
|
try:
|
||||||
tock.install(tabs, replace="yes", erase=args.erase)
|
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(
|
fatal("Couldn't install Tock application {}: {}".format(
|
||||||
self.args.application, str(e)))
|
self.args.application, str(e)))
|
||||||
|
|
||||||
@@ -252,7 +253,7 @@ class OpenSKInstaller(object):
|
|||||||
tock.open(args)
|
tock.open(args)
|
||||||
try:
|
try:
|
||||||
tock.flash_binary(padding, args.address)
|
tock.flash_binary(padding, args.address)
|
||||||
except tockloader.exceptions.TockLoaderException as e:
|
except TockLoaderException as e:
|
||||||
fatal("Couldn't install padding: {}".format(str(e)))
|
fatal("Couldn't install padding: {}".format(str(e)))
|
||||||
|
|
||||||
def clear_apps(self):
|
def clear_apps(self):
|
||||||
@@ -263,7 +264,7 @@ class OpenSKInstaller(object):
|
|||||||
tock.open(args)
|
tock.open(args)
|
||||||
try:
|
try:
|
||||||
tock.erase_apps(False)
|
tock.erase_apps(False)
|
||||||
except tockloader.exceptions.TockLoaderException as e:
|
except TockLoaderException as e:
|
||||||
# Erasing apps is not critical
|
# Erasing apps is not critical
|
||||||
info(("A non-critical error occured while erasing "
|
info(("A non-critical error occured while erasing "
|
||||||
"apps: {}".format(str(e))))
|
"apps: {}".format(str(e))))
|
||||||
|
|||||||
Reference in New Issue
Block a user