Skip to content

Commit 053d2f2

Browse files
templates: device: Simplify return
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
1 parent e8e7d26 commit 053d2f2

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

generate/templates/device.py.in

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@ class PingDevice(object):
7676
#
7777
# @return True if the device replies with expected data, False otherwise
7878
def initialize(self):
79-
if (self.request(definitions.COMMON_PROTOCOL_VERSION) is None):
80-
return False
81-
return True
79+
return self.request(definitions.COMMON_PROTOCOL_VERSION) is not None
8280

8381
##
8482
# @brief Request the given message ID

0 commit comments

Comments
 (0)