Changed code to write some data in sorted order into the projects file.

Mon, 05 Sep 2011 19:30:37 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 05 Sep 2011 19:30:37 +0200
changeset 1292
74fc87c7b7a8
parent 1290
e131e4f5446b
child 1294
d051b9d1426d

Changed code to write some data in sorted order into the projects file.

E5XML/ProjectWriter.py file | annotate | diff | comparison | revisions
--- a/E5XML/ProjectWriter.py	Mon Sep 05 19:21:16 2011 +0200
+++ b/E5XML/ProjectWriter.py	Mon Sep 05 19:30:37 2011 +0200
@@ -162,7 +162,7 @@
         
         # do the filetype associations
         self.writeStartElement("FiletypeAssociations")
-        for pattern, filetype in list(self.pdata["FILETYPES"].items()):
+        for pattern, filetype in sorted(self.pdata["FILETYPES"].items()):
             self.writeEmptyElement("FiletypeAssociation")
             self.writeAttribute("pattern", pattern)
             self.writeAttribute("type", filetype)
@@ -171,7 +171,7 @@
         # do the lexer associations
         if self.pdata["LEXERASSOCS"]:
             self.writeStartElement("LexerAssociations")
-            for pattern, lexer in list(self.pdata["LEXERASSOCS"].items()):
+            for pattern, lexer in sorted(self.pdata["LEXERASSOCS"].items()):
                 self.writeEmptyElement("LexerAssociation")
                 self.writeAttribute("pattern", pattern)
                 self.writeAttribute("lexer", lexer)

eric ide

mercurial