]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
fix for windows: import pwd does not work in win
authorSerge Rehbinder <serge.rehbinder@cea.fr>
Mon, 14 Nov 2016 14:12:51 +0000 (15:12 +0100)
committerSerge Rehbinder <serge.rehbinder@cea.fr>
Mon, 14 Nov 2016 14:12:51 +0000 (15:12 +0100)
src/architecture.py

index 75af0e461ea483e4da1340edc0156b1191277df6..b2073b070c759353b43bd352976e70fc8d759eab 100644 (file)
@@ -21,7 +21,7 @@ In this file : all the stuff that can change with the architecture
 on which SAT is running
 '''
 
-import os, sys, platform, pwd
+import os, sys, platform
 
 def is_windows():
     '''method that checks windows OS
@@ -41,6 +41,7 @@ def get_user():
             raise Exception('USERNAME environment variable not set')
         return os.environ['USERNAME']
     else: # linux
+        import pwd
         return pwd.getpwuid(os.getuid())[0]
 
 def _lsb_release(args):