We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84a275c commit f082a05Copy full SHA for f082a05
1 file changed
Python/pythonrun.c
@@ -89,17 +89,14 @@ int
89
PyRun_AnyFileExFlags(FILE *fp, const char *filename, int closeit,
90
PyCompilerFlags *flags)
91
{
92
- PyObject *filename_obj;
+ PyObject *filename_obj = NULL;
93
if (filename != NULL) {
94
filename_obj = PyUnicode_DecodeFSDefault(filename);
95
if (filename_obj == NULL) {
96
PyErr_Print();
97
return -1;
98
}
99
100
- else {
101
- filename_obj = NULL;
102
- }
103
int res = _PyRun_AnyFileObject(fp, filename_obj, closeit, flags);
104
Py_XDECREF(filename_obj);
105
return res;
0 commit comments