Skip to content

Commit

Permalink
Fix: Simplified if logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
nesitor committed Nov 8, 2023
1 parent 2597554 commit c4fb0cc
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/aleph/vm/hypervisors/firecracker/microvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,7 @@ async def save_configuration_file(self, config: FirecrackerConfig) -> Path:
NamedTemporaryFile(delete=False) as tmp_config_file,
open(f"{self.jailer_path}/tmp/config.json", "wb") as tmp_jailer_config_file,
):
if not self.use_jailer:
config_file = tmp_config_file
else:
config_file = tmp_jailer_config_file

config_file = tmp_config_file if not self.use_jailer else tmp_jailer_config_file
config_file.write(config.json(by_alias=True, exclude_none=True, indent=4).encode())
config_file.flush()
os.chmod(config_file.name, 0o644)
Expand Down

0 comments on commit c4fb0cc

Please sign in to comment.