Skip to content

Commit f36f42b

Browse files
committed
repair reworked
1 parent 6158433 commit f36f42b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

core/data/impl/nodeimpl.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,9 @@ def run_subprocess() -> int:
735735
else:
736736
self.log.error(f"Repair of {self.installation} failed with code {rc}.")
737737
message = f"DCS World repair failed on node {self.node.name} with code {rc}."
738+
except PermissionError:
739+
message = f"Could not desanitise DCS World on node {self.node.name} due to permission error."
740+
raise
738741
except Exception as ex:
739742
message = f"DCS World repair failed on node {self.node.name} with exception {ex}."
740743
raise

plugins/admin/commands.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,9 @@ async def repair(self, interaction: discord.Interaction,
511511
content=_("The repair takes longer than 10 minutes. It will generate an audit message when finished."),
512512
ephemeral=True)
513513
except PermissionError as ex:
514-
await msg.edit(content=str(ex))
514+
await msg.edit(
515+
content=_("Could not repair DCS World on node {name} due to a permission error: {error}").format(
516+
name=node.name, error=repr(ex)))
515517

516518
@dcs.command(name='install', description=_('Install modules in your DCS server'))
517519
@app_commands.guild_only()

0 commit comments

Comments
 (0)