Merge pull request #1353 from YunoHost/ci-format-dev

[CI] Format code
This commit is contained in:
Alexandre Aubin 2021-10-05 13:46:46 +02:00 committed by GitHub
commit bbba01a72c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1019,7 +1019,9 @@ class FileQuestion(Question):
FileQuestion.upload_dirs += [upload_dir]
logger.debug(f"Saving file {self.name} for file question into {file_path}")
if Moulinette.interface.type != "api" or (self.value.startswith("/") and os.path.exists(self.value)):
if Moulinette.interface.type != "api" or (
self.value.startswith("/") and os.path.exists(self.value)
):
content = read_file(str(self.value), file_mode="rb")
else:
content = b64decode(self.value)