Author: dmeyer
Date: Fri Jan  5 14:05:47 2007
New Revision: 2351

Modified:
   trunk/base/src/distribution/xmlconfig.py

Log:
make it possible to add default values for dict

Modified: trunk/base/src/distribution/xmlconfig.py
==============================================================================
--- trunk/base/src/distribution/xmlconfig.py    (original)
+++ trunk/base/src/distribution/xmlconfig.py    Fri Jan  5 14:05:47 2007
@@ -152,6 +152,15 @@
         if len(schema) > 1:
             deep = deep[:-2]
             fd.write(']\n' + deep)
+        defaults = {}
+        for var in node:
+            if var.name != 'set':
+                continue
+            value = get_value(var.getattr('value'), None)
+            defaults[var.getattr('key')] = value
+        if defaults:
+            fd.write(', defaults=%s' % pprint.pformat(defaults).strip())
+            
         fd.write(')')
 
 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to