diff --git a/Agent/config.py b/Agent/config.py index 881a046f..ba73ef98 100644 --- a/Agent/config.py +++ b/Agent/config.py @@ -7,13 +7,17 @@ lPyOpenRPASourceFolderPathStr = r"..\Sources" # Path for test pyOpenRPA package if lPyOpenRPASourceFolderPathStr != "": sys.path.insert(0,os.path.abspath(os.path.join(lPyOpenRPASourceFolderPathStr))) # Path for test pyOpenRPA package from pyOpenRPA.Agent import __Agent__ +from pyOpenRPA.Tools import CrossOS + +if CrossOS.IS_WINDOWS_BOOL: lPortInt = 80 +if CrossOS.IS_LINUX_BOOL: lPortInt = 1024 gUserNameUpperStr = getpass.getuser().upper() if __name__ == "__main__": # New init way gSettings = { "OrchestratorDict":{ "IsHTTPSBool": False, # True - if server is secured HTTPS, False - if server is not secured HTTP "HostStr":"127.0.0.1", - "PortInt":80, + "PortInt":lPortInt, "SuperTokenStr":"1992-04-03-0643-ru-b4ff-openrpa52zzz", # Access token to Orchestrator }, "O2ADict":{ @@ -57,7 +61,7 @@ if __name__ == "__main__": # New init way lL.setLevel(logging.INFO) # create the logging file handler mRobotLoggerFH = logging.FileHandler( - "Logs\\" + gUserNameUpperStr + "_" + datetime.datetime.now().strftime("%Y_%m_%d") + ".log") + os.path.normpath("Logs\\" + gUserNameUpperStr + "_" + datetime.datetime.now().strftime("%Y_%m_%d") + ".log")) mRobotLoggerFormatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s') mRobotLoggerFH.setFormatter(mRobotLoggerFormatter) # add handler to logger object