Skip to content

Commit

Permalink
Merge pull request #674 from cmonr/sterm-fixes-for-py3
Browse files Browse the repository at this point in the history
sterm fixes for py3
  • Loading branch information
screamerbg authored May 24, 2018
2 parents f168237 + b3ab18e commit 892f907
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mbed/mbed.py
Original file line number Diff line number Diff line change
Expand Up @@ -1779,7 +1779,7 @@ def formaturl(url, format="default"):
# Wrapper for the MbedTermnal functionality
def mbed_sterm(port, baudrate=9600, echo=True, reset=False, sterm=False):
try:
from mbed_terminal import MbedTerminal
from .mbed_terminal import MbedTerminal
except (IOError, ImportError, OSError):
error("The serial terminal functionality requires that the 'mbed-terminal' python module is installed.\nYou can install mbed-terminal by running 'pip install mbed-terminal'.", 1)

Expand Down
4 changes: 1 addition & 3 deletions mbed/mbed_terminal.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

#!/usr/bin/env python2
#!/usr/bin/env python

# Copyright (c) 2016 ARM Limited, All Rights Reserved
# SPDX-License-Identifier: Apache-2.0
Expand Down Expand Up @@ -43,7 +42,6 @@ def __init__(self, port, baudrate=9600, echo=True, timeout=10):
self.serial.flush()
self.serial.reset_input_buffer()
except Exception as e:
print 'error'
self.serial = None
return False

Expand Down

0 comments on commit 892f907

Please sign in to comment.