I have a FunctionItem like:
root_path = FunctionItem("Set a path for the root directory: ", set_root_path, [None, False], menu=new_profile_menu)
new_profile_menu.append_item(root_path)
the set_root_path function contain a line:
if not path.isdir(root) or force:
mkdir(root)
mkdir(root+'profile')
which makes the menu jump to the previous one without finishing the function call. if I remove the line it works.
even if I only have
I have a FunctionItem like: root_path = FunctionItem("Set a path for the root directory: ", set_root_path, [None, False], menu=new_profile_menu) new_profile_menu.append_item(root_path)
the set_root_path function contain a line:
if not path.isdir(root) or force: mkdir(root) mkdir(root+'profile')
which makes the menu jump to the previous one without finishing the function call. if I remove the line it works. even if I only have
print(path.isdir(root))
same happens.