Skip to content

Commit

Permalink
More appropriate scales command error
Browse files Browse the repository at this point in the history
  • Loading branch information
tfarago committed Sep 12, 2013
1 parent 2ce8810 commit 9daf343
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions concert/devices/scales/adventurer.py
Expand Up @@ -7,12 +7,6 @@
from concert.devices.scales.base import WeightError


class AdventurerError(Exception):

"""Error specific for Adventurer scales."""
pass


class ARRW60(base.TarableScales):

"""The ARRW60 model of Adventurer scales."""
Expand All @@ -28,7 +22,7 @@ def __init__(self, host, port):
def _execute(self, cmd):
result = self._connection.execute(cmd)
if "OK!" not in result:
raise AdventurerError("Bad command or value")
raise ValueError("Bad command or value")

This comment has been minimized.

Copy link
@tfarago

tfarago Sep 12, 2013

Author Contributor

Bad command is in fact bad value for communication and bad value if the command is right is obviously also a bad value.


def _tare(self):
self._execute("T")
Expand Down

0 comments on commit 9daf343

Please sign in to comment.