mirror of
https://github.com/JoelBender/bacpypes
synced 2025-09-28 22:15:23 +08:00
fix syntax and remove string format function call (#243)
This commit is contained in:
parent
fd27c54ac7
commit
9af0e54c7c
|
@ -157,7 +157,7 @@ class SSM(OneShotTask, DebugContents):
|
|||
|
||||
# check for invalid segment number
|
||||
if indx >= self.segmentCount:
|
||||
raise RuntimeError("invalid segment number {0}, APDU has {1} segments".format(indx, self.segmentCount))
|
||||
raise RuntimeError("invalid segment number %r, APDU has %r segments" % (indx, self.segmentCount))
|
||||
|
||||
if self.segmentAPDU.apduType == ConfirmedRequestPDU.pduType:
|
||||
if _debug: SSM._debug(" - confirmed request context")
|
||||
|
|
|
@ -419,7 +419,9 @@ class Switch(Client, Server):
|
|||
Server.__init__(self)
|
||||
|
||||
# wrap the terminals
|
||||
self.terminals = {k:Switch.TerminalWrapper(self, v) for k, v in terminals.items()}
|
||||
self.terminals = {}
|
||||
for k, v in terminals.items():
|
||||
self.terminals[k] = Switch.TerminalWrapper(self, v)
|
||||
self.current_terminal = None
|
||||
|
||||
def __getitem__(self, key):
|
||||
|
|
Loading…
Reference in New Issue
Block a user