Changes to 2 files · Browse files at b1f375b8b255 Showing diff from parent 11e4b3d18288 Diff from another changeset...
@@ -4,6 +4,8 @@
* Fix use of alternates in ``DiskObjectStore``.{__contains__,__iter__}.
(Dmitriy)
+
+ * Fix compatibility with Python 2.4. (David Carr)
0.8.6 2012-11-09
|
@@ -1243,8 +1243,11 @@ self._controldir = root
elif (os.path.isfile(os.path.join(root, ".git"))):
import re
- with open(os.path.join(root, ".git"), 'r') as f:
+ f = open(os.path.join(root, ".git"), 'r')
+ try:
_, path = re.match('(gitdir: )(.+$)', f.read()).groups()
+ finally:
+ f.close()
self.bare = False
self._controldir = os.path.join(root, path)
else:
|
Loading...