Permalink
Browse files

Fix an issue where using exec w/ a trace function doesn't work.

  • Loading branch information...
1 parent d299e5a commit b2a243fc19fb6a83bdc3b3168acb4ceb9b4bcc37 @DinoV DinoV committed Aug 26, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 Languages/IronPython/IronPython/Runtime/FunctionCode.cs
@@ -579,7 +579,7 @@ public class FunctionCode : IExpressionSerializable {
throw PythonOps.TypeError("cannot exec code object that contains free variables: {0}", co_freevars.__repr__(context));
}
- if (Target == null) {
+ if (Target == null || (Target.Method != null && Target.Method.DeclaringType == typeof(PythonCallTargets))) {
UpdateDelegate(context.LanguageContext, true);
}

0 comments on commit b2a243f

Please sign in to comment.