add shebang to conf_files so that bootmanager can call it directly
[nodemanager.git] / conf_files.py
old mode 100644 (file)
new mode 100755 (executable)
index 7b0cada..7fb28cb
@@ -1,3 +1,5 @@
+#!/usr/bin/env python3
+
 """configuration files"""
 
 import grp
@@ -7,7 +9,6 @@ try:
     from hashlib import sha1 as sha
 except ImportError:
     from sha import sha
-import string
 
 import curlwrapper
 import logger
@@ -41,7 +42,7 @@ class conf_files:
         if not cf_rec['enabled']: return
         dest = cf_rec['dest']
         err_cmd = cf_rec['error_cmd']
-        mode = string.atoi(cf_rec['file_permissions'], base=8)
+        mode = int(cf_rec['file_permissions'], base=8)
         try:
             uid = pwd.getpwnam(cf_rec['file_owner'])[2]
         except: