Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#245 unittest coverage #249

Merged
merged 16 commits into from
Dec 22, 2017
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pymodbus.egg-info/
.vscode
.idea
.noseids

*.db
.idea/
.tox/
doc/api/epydoc/html/
Expand Down
4 changes: 2 additions & 2 deletions examples/contrib/message_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
ReturnSlaveBusCharacterOverrunCountRequest,
ReturnIopOverrunCountRequest,
ClearOverrunCountRequest,
GetClearModbusPlusRequest,
GetClearModbusPlusRequest
]


Expand Down Expand Up @@ -128,7 +128,7 @@
ReturnSlaveBusCharacterOverrunCountResponse,
ReturnIopOverrunCountResponse,
ClearOverrunCountResponse,
GetClearModbusPlusResponse,
GetClearModbusPlusResponse
]


Expand Down
4 changes: 4 additions & 0 deletions examples/contrib/message_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ def get_options():
help="If the incoming message is in hexadecimal format",
action="store_true", dest="transaction", default=False)

parser.add_option("-t", "--transaction",
help="If the incoming message is in hexadecimal format",
action="store_true", dest="transaction", default=False)

(opt, arg) = parser.parse_args()

if not opt.message and len(arg) > 0:
Expand Down
4 changes: 2 additions & 2 deletions pymodbus/pdu.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ class ModbusExceptions(Singleton):
@classmethod
def decode(cls, code):
''' Given an error code, translate it to a
string error name.
string error name.

:param code: The code number to translate
'''
values = dict((v, k) for k, v in iteritems(cls.__dict__)
Expand Down
2 changes: 1 addition & 1 deletion pymodbus/server/async.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def datagramReceived(self, data, addr):

:param data: The data sent by the client
'''
_logger.debug("Client Connected [%s:%s]" % addr)
_logger.debug("Client Connected [%s]" % addr)
if _logger.isEnabledFor(logging.DEBUG):
_logger.debug(" ".join([hex(byte2int(x)) for x in data]))
if not self.control.ListenOnly:
Expand Down
Loading