File ecflow_fuse.py.patch of Package ecflow

--- ecFlow-5.7.2-Source/tools/ecflow_fuse.py	(original)
+++ ecFlow-5.7.2-Source/tools/ecflow_fuse.py	(refactored)
@@ -1,6 +1,7 @@
 #!/usr/bin/env python2
 # file deepcode ignore SSHHostKeyVerificationDisabled: <comment the reason here>
 from __future__ import print_function
+from __future__ import absolute_import
 import os
 import sys
 import time
@@ -733,14 +734,14 @@
             st['st_dev'] = 0      # (device)
             st['st_nlink'] = 0      # (number of hard links)
             st['st_size'] = 0      # (size of file, in bytes)
-            st['st_mode'] = (S_IFDIR | 0750)
+            st['st_mode'] = (S_IFDIR | 0o750)
             st['st_nlink'] = 2
             return st
 
         st['st_ctime'] = st['st_mtime'] = st['st_atime'] = time.time()
 
         if '.' in path:
-            st['st_mode'] = (S_IFREG | 0444)
+            st['st_mode'] = (S_IFREG | 0o444)
             ext = ""
             try:
                 splitted = path.split('.')
@@ -761,11 +762,11 @@
                     st['st_size'] = 0
 
             elif "README" in path or ".meter." in path or ".event" in path:
-                st['st_mode'] = (S_IFREG | 0444)
+                st['st_mode'] = (S_IFREG | 0o444)
                 st['st_size'] = FILESIZE
 
             elif ext in ("exe", "url", ):
-                st['st_mode'] = (S_IFREG | 0700)
+                st['st_mode'] = (S_IFREG | 0o700)
 
             elif "@" in path:
                 res = self.server_cmd(ext, 0)
@@ -827,7 +828,7 @@
                                  ext=ext)
 
         elif 1:
-            st['st_mode'] = (S_IFDIR | 0444)
+            st['st_mode'] = (S_IFDIR | 0o444)
             st['st_size'] = 1
 
         else:
@@ -879,7 +880,7 @@
 
         elif "README" in path:
             st = attrs('.')
-            st['st_mode'] = (S_IFREG | 0444)
+            st['st_mode'] = (S_IFREG | 0o444)
             st['st_size'] = FILESIZE
             return README
 
openSUSE Build Service is sponsored by