Modify temp folder for certs 92/104692/1
authoresobmar <mariusz.sobucki@est.tech>
Mon, 30 Mar 2020 14:14:19 +0000 (15:14 +0100)
committeresobmar <mariusz.sobucki@est.tech>
Mon, 30 Mar 2020 14:53:38 +0000 (15:53 +0100)
Issue-ID: SDNC-991
Signed-off-by: esobmar <mariusz.sobucki@est.tech>
Change-Id: I0993a8ec1e38faa93f67ad2d2eaad96af7cae4a1

Former-commit-id: 20fb86922a6993b14c0ea5edf6d5d3bdc6c9ba1f

installation/sdnc/src/main/scripts/installCerts.py

index 8135f60..aaddedf 100644 (file)
@@ -32,7 +32,7 @@ log_file = '/opt/opendaylight/data/log/installCerts.log'
 log_format = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
 logging.basicConfig(filename=log_file,level=logging.DEBUG,filemode='w',format=log_format)
 
-Path = os.environ['ODL_CERT_DIR']
+Path = "/tmp"
 
 zipFileList = []
 
@@ -226,10 +226,10 @@ def get_pass(file_name):
 
 
 def cleanup():
-    for file in os.listdir(Path):
-        if os.path.isfile(Path + '/' + file):
-            logging.debug("Cleaning up the file %s", Path + '/'+ file)
-            os.remove(Path + '/'+ file)
+    for file in jks_files:
+        if os.path.isfile(file):
+            logging.debug("Cleaning up the file %s", file)
+            os.remove(file)
 
 
 def jks_to_p12(file, password):