Commit 2e096b3e authored by Ad Schellevis's avatar Ad Schellevis

configd, template sorting, missing type. closes https://github.com/opnsense/core/issues/1641

parent f499c3dd
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
package : configd package : configd
""" """
import collections
import netaddr import netaddr
import operator import operator
...@@ -122,6 +123,6 @@ class Helpers(object): ...@@ -122,6 +123,6 @@ class Helpers(object):
def sortDictList(lst, *operators): def sortDictList(lst, *operators):
if type(lst) == list: if type(lst) == list:
lst.sort(key=operator.itemgetter(*operators)) lst.sort(key=operator.itemgetter(*operators))
elif type(lst) == dict: elif type(lst) in (collections.OrderedDict, dict):
return [lst] return [lst]
return lst return lst
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment