Salome HOME
Adapt SALOME non-regression test bases for salome test driver
[modules/kernel.git] / bin / appliskel / update_catalogs.py
index fb637b342d32a991a2a41671bca89729e4d19734..94b0f7fd2e0672d61f6b37997ee6351f4d779ebd 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python3
 #  -*- coding: utf-8 -*-
-# Copyright (C) 2007-2019  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2020  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -30,7 +30,7 @@ from salome_utils import getUserName
 
 import getAppliPath
 appli_local=os.path.realpath(os.path.dirname(__file__))
-APPLI=getAppliPath.relpath(appli_local,os.path.realpath(os.getenv('HOME')))
+APPLI=getAppliPath.relpath(appli_local,os.path.realpath(os.path.expanduser("~")))
 
 usage="""%(prog)s [options]
 Typical use is:
@@ -148,7 +148,7 @@ class Resource:
       #local machine, use cp
       if appliPath[0]!='/':
         #relative path
-        appliPath=os.path.join(os.getenv("HOME"),appliPath)
+        appliPath=os.path.join(os.path.expanduser("~"),appliPath)
 
       if appliPath == appli_local:
         return
@@ -191,7 +191,7 @@ class Resource:
     if hostname == "localhost" or hostname == get_hostname() and userName == getUserName():
       #user local resource
       if appliPath[0]!='/':
-        appliPath=os.path.join(os.getenv("HOME"),appliPath)
+        appliPath=os.path.join(os.path.expanduser("~"),appliPath)
       if appliPath == appli_local:
         #main local resource: get catalogs in share/salome/resources
         catalogs_list=glob.glob(os.path.join(appliPath,"share","salome","resources","*","*Catalog.xml"))