lsprof: make profile not die when imported modules changes (issue1774)
authorDirkjan Ochtman <dirkjan@ochtman.nl>
Wed, 05 Aug 2009 14:58:30 +0200
changeset 9314 3f93f6838639
parent 9313 8736b1c853ff
child 9315 fb66a7d3f28f
lsprof: make profile not die when imported modules changes (issue1774)
mercurial/lsprof.py
--- a/mercurial/lsprof.py	Wed Aug 05 17:19:08 2009 +0200
+++ b/mercurial/lsprof.py	Wed Aug 05 14:58:30 2009 +0200
@@ -87,7 +87,7 @@
     try:
         mname = _fn2mod[code.co_filename]
     except KeyError:
-        for k, v in sys.modules.iteritems():
+        for k, v in list(sys.modules.iteritems()):
             if v is None:
                 continue
             if not hasattr(v, '__file__'):