From: Gerhard Sittig Date: Fri, 22 Dec 2017 01:35:12 +0000 (+0100) Subject: sdcard_sd: remove unused .reset() method X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=0777df7434749962ca28fb66081cdacf24a16772;p=libsigrokdecode.git sdcard_sd: remove unused .reset() method The decoder's .reset() method seems to partially implement constructor's assignments, but is not referenced anywhere. There is neither a direct call site in the remainder of pd.py which uses the "reset" name, and runtime computation only references "handle_*()" methods for commands and responses. Drop the unused .reset() method in the individual decoder before the introduction of a common .reset() method approach for all decoders. --- diff --git a/decoders/sdcard_sd/pd.py b/decoders/sdcard_sd/pd.py index 4f10f7c..2382a15 100644 --- a/decoders/sdcard_sd/pd.py +++ b/decoders/sdcard_sd/pd.py @@ -92,10 +92,6 @@ class Decoder(srd.Decoder): def putr(self, desc): self.putt([self.last_cmd, ['Reply: %s' % desc]]) - def reset(self): - self.cmd, self.arg = None, None - self.token, self.state = [], 'GET COMMAND TOKEN' - def cmd_name(self, cmd): c = acmd_names if self.is_acmd else cmd_names return c.get(cmd, 'Unknown')