Revert "Workaround for backup binary not being executable"

This reverts commit 10acca45af.
This commit is contained in:
Orsiris de Jong 2023-03-25 17:33:18 +01:00
parent 10acca45af
commit 3a888b79ae

View file

@ -7,8 +7,8 @@ __intname__ = "npbackup.restic_wrapper"
__author__ = "Orsiris de Jong"
__copyright__ = "Copyright (C) 2022-2023 NetInvent"
__license__ = "GPL-3.0-only"
__build__ = "2023032501"
__version__ = "1.5.2"
__build__ = "2023030701"
__version__ = "1.5.1"
from typing import Tuple, List, Optional, Callable, Union
@ -75,8 +75,6 @@ class ResticRunner:
self._executor_finished = False # Internal value to check whether executor is done, accessed via self.executor_finished property
self._stdout = None # Optional outputs when command is run as thread
self.binary_is_executable = False
def on_exit(self) -> bool:
self._executor_finished = True
return self._executor_finished
@ -168,16 +166,6 @@ class ResticRunner:
def exec_time(self, value: int):
self._exec_time = value
def _make_binary_executable(self):
if self.binary_is_executable:
return True
try:
os.chmod(self._binary)
self.binary_is_executable = True
except OSError as exc:
logger.error("Cannot make \"{}\" executable: {}".format(self._binary, exc))
return False
def executor(
self,
cmd: str,
@ -190,9 +178,6 @@ class ResticRunner:
When using live_stream, we'll have command_runner fill stdout queue, which is useful for interactive GUI programs, but slower, especially for ls operation
"""
# Make sure binary is executable first (workaround for https://github.com/Nuitka/Nuitka/issues/1656#issuecomment-1483819959)
self._make_binary_executable()
start_time = datetime.utcnow()
self._executor_finished = False
_cmd = '"{}" {}{}'.format(self._binary, cmd, self.generic_arguments)