]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/ds1307/pd.py
All PDs: Drop unneeded exceptions.
[libsigrokdecode.git] / decoders / ds1307 / pd.py
index 6c36f04bacb31cb7f95d8235c7d6ea964565b96d..1a49f9a1b31baa77ea476949c4f525ccc5d57647 100644 (file)
@@ -36,7 +36,7 @@ def bcd2int(b):
     return (b & 0x0f) + ((b >> 4) * 10)
 
 class Decoder(srd.Decoder):
-    api_version = 1
+    api_version = 2
     id = 'ds1307'
     name = 'DS1307'
     longname = 'Dallas DS1307'
@@ -44,9 +44,9 @@ class Decoder(srd.Decoder):
     license = 'gplv2+'
     inputs = ['i2c']
     outputs = ['ds1307']
-    annotations = [
-        ['text', 'Human-readable text'],
-    ]
+    annotations = (
+        ('text', 'Human-readable text'),
+    )
 
     def __init__(self, **kwargs):
         self.state = 'IDLE'
@@ -164,6 +164,4 @@ class Decoder(srd.Decoder):
                 self.state = 'IDLE'
             else:
                 pass # TODO?
-        else:
-            raise Exception('Invalid state: %s' % self.state)