mercurial/templater.py
changeset 14944 e2c413bde8a5
parent 14943 d3bb825ddae3
child 16686 67964cda8701
--- a/mercurial/templater.py	Mon Jul 25 16:24:37 2011 -0500
+++ b/mercurial/templater.py	Mon Jul 25 15:30:19 2011 -0500
@@ -203,14 +203,14 @@
     '''yield a single stream from a possibly nested set of iterators'''
     if isinstance(thing, str):
         yield thing
-    elif not hasattr(thing, '__iter__'):
+    elif not util.safehasattr(thing, '__iter__'):
         if thing is not None:
             yield str(thing)
     else:
         for i in thing:
             if isinstance(i, str):
                 yield i
-            elif not hasattr(i, '__iter__'):
+            elif not util.safehasattr(i, '__iter__'):
                 if i is not None:
                     yield str(i)
             elif i is not None: