You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
1.2 KiB
28 lines
1.2 KiB
diff --git calculate/lib/cl_template.py calculate/lib/cl_template.py
|
|
index d5d7cdf..7363a50 100644
|
|
--- calculate/lib/cl_template.py
|
|
+++ calculate/lib/cl_template.py
|
|
@@ -4956,7 +4956,12 @@ gettext -d cl_template "$*"
|
|
if not crDirs is True:
|
|
createdDirs += crDirs
|
|
else:
|
|
- os.chmod(applyDir, mode)
|
|
+ try:
|
|
+ os.chmod(applyDir, mode)
|
|
+ except:
|
|
+ self.setError(
|
|
+ _("Failed to change mode for directory: ") +\
|
|
+ applyDir)
|
|
else:
|
|
self.setError(_("Wrong value 'chmod' in the template") + ": " +\
|
|
templateDirFile)
|
|
@@ -5127,7 +5132,7 @@ gettext -d cl_template "$*"
|
|
# Создание файла
|
|
FD = open(nameFileConfig, "w")
|
|
FD.close()
|
|
- os.chown(nameFileConfig, uid, gid)
|
|
+ os.lchown(nameFileConfig, uid, gid)
|
|
except Exception as e:
|
|
if hasattr(e,'errno') and e.errno == 13 and \
|
|
"var/calculate/remote" in nameFileConfig:
|