From 3553aee8cefe169acedb5236eecca4a76b6be0e7 Mon Sep 17 00:00:00 2001 From: Natalia Serrano Date: Thu, 5 Jun 2025 12:10:22 +0200 Subject: [PATCH] refs #2179 check that windows-only variable is defined --- src/opengnsys/httpserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'))