diff --git a/src/opengnsys/httpserver.py b/src/opengnsys/httpserver.py index 7ca3ba9..695ab9d 100644 --- a/src/opengnsys/httpserver.py +++ b/src/opengnsys/httpserver.py @@ -167,7 +167,7 @@ class HTTPServerThread(threading.Thread): logger.debug ('HTTP server: using certificate/CA from /opt/opengnsys/etc') context.load_cert_chain (certfile='/opt/opengnsys/etc/ogagent.crt', keyfile='/opt/opengnsys/etc/ogagent.key') context.load_verify_locations (cafile='/opt/opengnsys/etc/ca.crt') - elif os.path.exists (os.path.join (pf, 'ogagent.crt')) and os.path.exists (os.path.join (pf, 'ogagent.key')) and os.path.exists (os.path.join (pf, 'ca.crt')): + elif pf and os.path.exists (os.path.join (pf, 'ogagent.crt')) and os.path.exists (os.path.join (pf, 'ogagent.key')) and os.path.exists (os.path.join (pf, 'ca.crt')): logger.debug (f'HTTP server: using certificate/CA from the installation path ({pf})') context.load_cert_chain (certfile=os.path.join (pf, 'ogagent.crt'), keyfile=os.path.join (pf, 'ogagent.key')) context.load_verify_locations (cafile=os.path.join (pf, 'ca.crt'))