Browse Source

[2298_1] use sorted() instead of using sort() redundantly

Naoki Kambe 12 years ago
parent
commit
27cb11af84
1 changed files with 1 additions and 3 deletions
  1. 1 3
      src/bin/stats/stats_httpd.py.in

+ 1 - 3
src/bin/stats/stats_httpd.py.in

@@ -112,9 +112,7 @@ def item_name_list(element, identifier):
     if type(elem) is dict:
     if type(elem) is dict:
         if ident:
         if ident:
             ident = ident + '/'
             ident = ident + '/'
-        keys = list(elem.keys())
-        keys.sort()
-        for key in keys:
+        for key in sorted(elem.keys()):
             idstr = '%s%s' % (ident, key)
             idstr = '%s%s' % (ident, key)
             ret += item_name_list(element, idstr)
             ret += item_name_list(element, idstr)
     elif type(elem) is list:
     elif type(elem) is list: