1. Andriy Kornatskyy
  2. wheezy.template

Commits

Andriy Kornatskyy  committed 35fc164

Return list_names as sorted tuple.

  • Participants
  • Parent commits edcde98
  • Branches default

Comments (0)

Files changed (1)

File src/wheezy/template/loader.py

View file
                     name = os.path.join(dirpath, filename)[pathlen:]
                     name = name.replace('\\', '/')
                     names.append(name)
-        return tuple(names)
+        return tuple(sorted(names))
 
     def get_fullname(self, name):
         """ Returns a full path by a template name.
     def list_names(self):
         """ List all keys from internal dict.
         """
-        return tuple(self.templates.keys())
+        return tuple(sorted(self.templates.keys()))
 
     def load(self, name):
         """ Returns template by name.
         names = set()
         for loader in self.loaders:
             names |= set(loader.list_names())
-        return tuple(names)
+        return tuple(sorted(names))
 
     def load(self, name):
         """ Returns template by name from the first loader that succeed.