From 0c9d01417466f33712a41ce4bdd80c57396e17f8 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Sat, 30 Dec 2017 15:29:03 +0000 Subject: [PATCH] Remove default value for create_game_handle's game_path argument The LOOT API incorrectly allows it, it causes a runtime exception. --- docs/reference.rst | 2 +- src/main.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/reference.rst b/docs/reference.rst index 8a551e3..ed85e05 100644 --- a/docs/reference.rst +++ b/docs/reference.rst @@ -142,7 +142,7 @@ Functions that the system default locale will be initialised. Wraps :cpp:func:`loot::InitialiseLocale`. -.. py:function:: loot_api.create_game_handle(game : loot_api.GameType, [game_path : unicode = u'', [game_local_path : unicode = u'']]) -> loot_api.GameInterface +.. py:function:: loot_api.create_game_handle(game : loot_api.GameType, game_path : unicode, [game_local_path : unicode = u'']) -> loot_api.GameInterface Initialise a new game handle. Wraps :cpp:func:`loot::CreateGameHandle`. diff --git a/src/main.cpp b/src/main.cpp index 9d98698..0afce35 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -137,9 +137,9 @@ void bindFunctions(pybind11::module& module) { module.def("initialise_locale", &InitialiseLocale, arg("id") = ""); - module.def("create_game_handle", &CreateGameHandle, - arg("game"), - arg("game_path") = "", + module.def("create_game_handle", &CreateGameHandle, + arg("game"), + arg("game_path"), arg("game_local_path") = ""); } }