diff mercurial/patch.py @ 14966:0588fb0e2e8d

patch: use safehasattr instead of hasattr
author Augie Fackler <durin42@gmail.com>
date Mon, 25 Jul 2011 16:02:27 -0500
parents d60e4f227d75
children bfe903b1ff4e
line wrap: on
line diff
--- a/mercurial/patch.py	Mon Jul 25 16:02:15 2011 -0500
+++ b/mercurial/patch.py	Mon Jul 25 16:02:27 2011 -0500
@@ -126,7 +126,7 @@
 
     mimeheaders = ['content-type']
 
-    if not hasattr(stream, 'next'):
+    if not util.safehasattr(stream, 'next'):
         # http responses, for example, have readline but not next
         stream = fiter(stream)