From 389d21d222a503b9f5f43404ced4b10813008b3a Mon Sep 17 00:00:00 2001 From: Gerhard Sittig Date: Wed, 1 Aug 2018 18:35:57 +0200 Subject: [PATCH] mdio: accept MDIO READ without previous ADDRESS command Fix a Python string formatting issue, where the format string disagreed with the argument list. A READ command could unexpectedly terminate the decoder instance when there was no previous ADDRESS command. This fixes bug #1258. --- decoders/mdio/pd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decoders/mdio/pd.py b/decoders/mdio/pd.py index 9ea3a27..2522912 100644 --- a/decoders/mdio/pd.py +++ b/decoders/mdio/pd.py @@ -95,7 +95,7 @@ class Decoder(srd.Decoder): if self.clause45 and self.clause45_addr != -1: decoded_min += str.format('ADDR: %04X ' % self.clause45_addr) elif self.clause45: - decoded_min += str.format('ADDR: UKWN ' % self.clause45_addr) + decoded_min += str.format('ADDR: UKWN ') if self.clause45 and self.opcode > 1 \ or (not self.clause45 and self.opcode): -- 2.30.2