Skip to content

Commit

Permalink
use sorted and itemgetter
Browse files Browse the repository at this point in the history
  • Loading branch information
pbauer committed Mar 22, 2018
1 parent 3fdefc2 commit f8386d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/OFS/ObjectManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"""

from io import BytesIO
from operator import itemgetter
from logging import getLogger
import copy
import fnmatch
Expand Down Expand Up @@ -210,8 +211,7 @@ def __class_init__(self):
mt.append(t)
except Exception:
pass
mt.sort(key=lambda k: k['name'])
self.meta_types = tuple(mt)
self.meta_types = tuple(sorted(mt, key=itemgetter('name')))

InitializeClass(self)

Expand Down

0 comments on commit f8386d6

Please sign in to comment.