File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -1349,14 +1349,12 @@ class module_ : public object {
13491349 handle this_file = PyModule_GetFilenameObject (m_ptr);
13501350 if (this_file) {
13511351 result.attr (" __file__" ) = this_file;
1352- }
1353- else if (PyErr_ExceptionMatches (PyExc_SystemError) != 0 ) {
1352+ } else if (PyErr_ExceptionMatches (PyExc_SystemError) != 0 ) {
13541353 PyErr_Clear ();
1355- }
1356- else {
1354+ } else {
13571355 throw error_already_set ();
13581356 }
1359- #end
1357+ #endif
13601358 attr (name) = result;
13611359 return result;
13621360 }
Original file line number Diff line number Diff line change @@ -318,7 +318,7 @@ TEST_CASE("Restart the interpreter") {
318318 // C++ modules can be reloaded.
319319 auto cpp_module = py::module_::import (" widget_module" );
320320 REQUIRE (cpp_module.attr (" add" )(1 , 2 ).cast <int >() == 3 );
321-
321+
322322 // Also verify submodules work
323323 REQUIRE (cpp_module.attr (" sub" ).attr (" add" )(1 , 41 ).cast <int >() == 42 );
324324
You can’t perform that action at this time.
0 commit comments