Skip to content

Commit f4b42cd

Browse files
authored
Merge pull request #57 from apple1417/master
don't print errors if config file doesn't exist
2 parents 893bb58 + 887757d commit f4b42cd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/pyunrealsdk/base_bindings.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ void create_and_add_config_dict(py::module_& mod) {
126126
// in Python to begin with.
127127

128128
auto load_config_file = [](const std::filesystem::path&& path) -> py::object {
129+
if (!std::filesystem::exists(path)) {
130+
return py::none{};
131+
}
132+
129133
try {
130134
const py::dict globals{"path"_a = path};
131135
py::exec(

0 commit comments

Comments
 (0)