changeset 352:eeff298cc922

more crap
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 27 Jun 2013 02:13:40 -0700
parents 971e7deca495
children ee8ab3de9c7f
files python/hgrc.py
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/python/hgrc.py	Thu Jun 27 02:01:32 2013 -0700
+++ b/python/hgrc.py	Thu Jun 27 02:13:40 2013 -0700
@@ -57,6 +57,14 @@
             assert os.path.isfile(path), "%s is not a file, exiting" % path
         hgrc.append(path)
 
+    # construct ConfigParser objects and
+    # ensure that all the files are parseable
+    config = {}
+    for path in hgrc:
+        config['path'] = ConfigParser()
+        if isinstance(path, basestring):
+            config['path'].read(path)
+        
     if options.print:
         # print the chosen hgrc paths and you're done
         print '\n'.join(hgrc)