diff options
author | W. Trevor King <wking@tremily.us> | 2012-10-19 07:18:58 -0400 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2014-03-20 07:22:53 -0300 |
commit | 217347fc684d0fe5c4e1ce46430d5229ac211304 (patch) | |
tree | e6e547aecc094d10a405cdd062764ebd9ff2412d | |
parent | 66376cac1d8df310069300741b297c7a8bca84ed (diff) | |
download | kmod-217347fc684d0fe5c4e1ce46430d5229ac211304.tar.gz |
python: Use an OrderedDict for Module.info (preserving modinfo ordering).
-rw-r--r-- | libkmod/python/kmod/module.pyx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libkmod/python/kmod/module.pyx b/libkmod/python/kmod/module.pyx index b25f24f..31336b0 100644 --- a/libkmod/python/kmod/module.pyx +++ b/libkmod/python/kmod/module.pyx @@ -9,6 +9,8 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +import collections as _collections + cimport libc.errno as _errno cimport _libkmod_h @@ -75,7 +77,7 @@ cdef class Module (object): err = _libkmod_h.kmod_module_get_info(self.module, &ml.list) if err < 0: raise _KmodError('Could not get versions') - info = {} + info = _collections.OrderedDict() try: for item in ml: mli = <_list.ModListItem> item |