repo: drop nonstandard ConfigObj dependency
authorAugie Fackler <durin42@gmail.com>
Wed, 24 Feb 2010 21:11:22 +0000 (15:11 -0600)
committerAugie Fackler <durin42@gmail.com>
Wed, 24 Feb 2010 21:11:22 +0000 (15:11 -0600)
dulwich/repo.py

index 17559e8d5330dd8742c27cb7ecfd7f25eeb3d3f7..4ec75ad9595587c474b8adc15ba821f52b11ac20 100644 (file)
@@ -22,6 +22,7 @@
 """Repository access."""
 
 
+import ConfigParser
 import errno
 import os
 
@@ -671,8 +672,9 @@ class BaseRepo(object):
         return self.commit(sha).parents
 
     def get_config(self):
-        from configobj import ConfigObj
-        return ConfigObj(os.path.join(self._controldir, 'config'))
+        p = ConfigParser.RawConfigParser()
+        p.read(os.path.join(self._controldir, 'config'))
+        return dict((section, dict(p.items(section))) for section in p.sections())
 
     def commit(self, sha):
         return self._get_object(sha, Commit)