shaper: sort numerically, not alphabethically

This commit is contained in:
Franco Fichtner 2017-01-21 21:25:17 +01:00
parent 21be9faf45
commit 98333c13cf

View File

@ -28,7 +28,6 @@
package : configd
"""
from operator import itemgetter
import netaddr
@ -85,7 +84,7 @@ class Helpers(object):
return result
else:
# resort list by tag
return sorted(result, key=itemgetter(sortBy))
return sorted(result, key=lambda d: int(d[sortBy]))
def getUUIDtag(self, uuid):
""" retrieve tag name of registered uuid, returns __not_found__ if none available