Commit daab2d1d authored by Kevin Modzelewski's avatar Kevin Modzelewski

__import__ can be passed a unicode name

parent 30e7d45b
......@@ -472,6 +472,8 @@ Box* bltinImport(Box* name, Box* globals, Box* locals, Box** args) {
Box* fromlist = args[0];
Box* level = args[1];
name = coerceUnicodeToStr(name);
if (name->cls != str_cls) {
raiseExcHelper(TypeError, "__import__() argument 1 must be string, not %s", getTypeName(name));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment