Skip to content

Commit 67c12a0

Browse files
committed
Clean.
1 parent 0dbe304 commit 67c12a0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pymodbus/file_message.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,16 @@ def execute(self, context): # NOSONAR pylint: disable=unused-argument,no-self-u
139139
return ReadFileRecordResponse(files)
140140

141141
def get_response_pdu_size(self):
142-
"""
142+
"""Get response pdu size.
143+
143144
Func_code (1 byte) + Response Byte Count(1 byte) +
144145
N * (File Response Byte Count (1 byte) + Reference Type (1 byte) + 2 * registers to read for file record)
145146
where N = record sub-request count.
146147
:return:
147148
"""
148149
self.count = 0
149150
for record in self.records:
150-
self.count+= record.record_length * 2 + 2 if record.record_length else 0
151+
self.count += record.record_length * 2 + 2 if record.record_length else 0
151152

152153
return 2 + self.count
153154

0 commit comments

Comments
 (0)