]> sigrok.org Git - libsigrok.git/commitdiff
python: Use OrderedDict for input formats.
authorMartin Ling <redacted>
Tue, 17 Dec 2013 16:25:13 +0000 (16:25 +0000)
committerMartin Ling <redacted>
Tue, 17 Dec 2013 16:29:41 +0000 (16:29 +0000)
bindings/python/sigrok/core/classes.py

index 7d4ce3b711a969780394974060e5c0a183de827c..b5a64cfc2e13bf78f6e20b67a6b7037a4b7ff5d8 100644 (file)
@@ -19,6 +19,7 @@
 
 from functools import partial
 from fractions import Fraction
+from collections import OrderedDict
 from .lowlevel import *
 from . import lowlevel
 import itertools
@@ -111,7 +112,7 @@ class Context(object):
     @property
     def input_formats(self):
         if not self._input_formats:
-            self._input_formats = {}
+            self._input_formats = OrderedDict()
             input_list = sr_input_list()
             for i in itertools.count():
                 input_ptr = sr_input_format_ptr_array_getitem(input_list, i)