Skip to content

Commit ab0ca35

Browse files
committed
at command: use '-' in '__str__' if parameter for ATCommand is not defined
Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
1 parent 5a1029a commit ab0ca35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

digi/xbee/models/atcomm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2017-2021, Digi International Inc.
1+
# Copyright 2017-2024, Digi International Inc.
22
#
33
# This Source Code Form is subject to the terms of the Mozilla Public
44
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -291,7 +291,7 @@ def __str__(self):
291291
String: representation of this ATCommand.
292292
"""
293293
return "Command: %s - Parameter: %s" \
294-
% (self.__cmd, utils.hex_to_string(self.__param))
294+
% (self.__cmd, utils.hex_to_string(self.__param) if self.__param else "-")
295295

296296
def __len__(self):
297297
"""

0 commit comments

Comments
 (0)