Skip to content

Commit

Permalink
If the flags passed to compile are null, convert to 0.
Browse files Browse the repository at this point in the history
Otherwise, ConvertToInt32 throws.
  • Loading branch information
jdhardy committed Apr 10, 2011
1 parent 25b93d8 commit 4cb6921
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Languages/IronPython/IronPython/Modules/Builtin.cs
Expand Up @@ -284,7 +284,7 @@ public static partial class Builtin {
}

bool astOnly = false;
int iflags = Converter.ConvertToInt32(flags);
int iflags = flags != null ? Converter.ConvertToInt32(flags) : 0;
if ((iflags & _ast.PyCF_ONLY_AST) != 0) {
astOnly = true;
iflags &= ~_ast.PyCF_ONLY_AST;
Expand Down

0 comments on commit 4cb6921

Please sign in to comment.