Skip to content
Snippets Groups Projects
Unverified Commit cb13ff69 authored by Jean-Michel Picod's avatar Jean-Michel Picod Committed by GitHub
Browse files

Merge pull request #49 from jmichelp/master

Fix errors in deploy script.
parents 36f2530a 8ad28efa
No related branches found
No related tags found
No related merge requests found
...@@ -25,6 +25,7 @@ import os ...@@ -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): ...@@ -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): ...@@ -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): ...@@ -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): ...@@ -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))))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment