Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pylink/jlink.py
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ def open(self, serial_no=None, ip_addr=None):
# preserved here to simplify workflows using one emulator:
result = self._dll.JLINKARM_SelectUSB(0)
if result != 0:
raise errors.JlinkException('Could not connect to default emulator.')
raise errors.JLinkException('Could not connect to default emulator.')

# Acquire the lock for the J-Link being opened only if the serial
# number was passed in, otherwise skip it here. Note that the lock
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_jlink.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ def test_jlink_open_unspecified(self):
Returns:
``None``
"""
with self.assertRaises(AttributeError):
with self.assertRaises(JLinkException):
self.jlink.open()

def test_jlink_open_unspecified_context_manager(self):
Expand All @@ -587,7 +587,7 @@ def test_jlink_open_unspecified_context_manager(self):
Returns:
``None``
"""
with self.assertRaises(AttributeError):
with self.assertRaises(JLinkException):
with jlink.JLink(self.lib) as jl:
self.assertTrue(jl.opened()) # Opened in CM.
self.dll.JLINKARM_Close.assert_called() # Closed on exit.
Expand Down
Loading