Catch TypeError in repo.wwrite for Mercurial rev 656e06eebda7
authorChristian Ebert <blacktrash@gmx.net>
Sun, 02 Sep 2007 15:35:18 +0200
changeset 236 e52075167842
parent 235 baef9dcfb219
child 237 0a0049700af5
Catch TypeError in repo.wwrite for Mercurial rev 656e06eebda7 This is the one revision that had the file descriptor removed, but the flags argument not added yet.
hgkw/keyword.py
--- a/hgkw/keyword.py	Sun Sep 02 15:16:57 2007 +0200
+++ b/hgkw/keyword.py	Sun Sep 02 15:35:18 2007 +0200
@@ -191,10 +191,11 @@
 
     def _wwrite(self, f, data, man):
         '''Makes repo.wwrite backwards compatible.'''
+        # 656e06eebda7 removed file descriptor argument
+        # 67982d3ee76c added flags argument
         try:
             self.repo.wwrite(f, data, man.flags(f))
-        except AttributeError:
-            # older versions want file descriptor as 3. optional arg
+        except (AttributeError, TypeError):
             self.repo.wwrite(f, data)
 
     def _normal(self, files):