CLIController: use absolute project path python3
authorGP Orcullo <kinsamanka@gmail.com>
Fri, 10 Feb 2023 18:40:42 +0800
branchpython3
changeset 3787 56ceda9889f8
parent 3786 50935528d313
child 3788 d5014da90054
CLIController: use absolute project path
CLIController.py
--- a/CLIController.py	Fri Feb 10 10:02:21 2023 +0800
+++ b/CLIController.py	Fri Feb 10 18:40:42 2023 +0800
@@ -143,6 +143,9 @@
                 _("\"%s\" is not a valid Beremiz project\n") % self.session.project_home)
             return True
 
+        if not os.path.isabs(self.session.project_home):
+            self.session.project_home = os.path.join(os.getcwd(), self.session.project_home)
+
         errmsg, error = self.LoadProject(self.session.project_home, self.session.buildpath)
         if error:
             self.logger.write_error(errmsg)