fix: convert file mode string to ocal

This commit is contained in:
Robert Kaussow 2022-03-27 23:50:39 +02:00
parent 5a02daea40
commit e5d02b3293
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
2 changed files with 2 additions and 2 deletions

View File

@ -174,7 +174,7 @@ class PrometheusSD:
json.dump(output, tf, indent=4)
shutil.move(temp_file.name, self.config.config["output_file"])
chmod(self.config.config["output_file"], self.config.config["output_file_mode"])
chmod(self.config.config["output_file"], int(self.config.config["output_file_mode"], 8))
def _terminate(self, signal, frame):
self.log.sysexit_with_message("Terminating", code=0)

View File

@ -71,7 +71,7 @@ class Config():
"type": environs.Env().str
},
"output_file_mode": {
"default": "0644",
"default": "0640",
"env": "OUTPUT_FILE_MODE",
"file": True,
"type": environs.Env().str