Skip to content

Commit

Permalink
rm unnecessary lines
Browse files Browse the repository at this point in the history
  • Loading branch information
Umit Kablan committed Oct 3, 2024
1 parent 5efe92c commit e8d9f70
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion pleskdistup/common/src/dpkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ def restore_installation() -> None:


def do_distupgrade(locked_sleep_intervals: typing.List[int] = []) -> None:
i = 0
cant_get_lock = False

def process_stdout(line: str) -> None:
Expand All @@ -205,6 +204,7 @@ def process_stderr(line: str) -> None:
if "E: Could not get lock" in line:
cant_get_lock = True

i = 0
cmd = ["apt-get", "dist-upgrade", "-y"] + APT_CHOOSE_OLD_FILES_OPTIONS
while True:
log.info(f"Executing: {' '.join(cmd)}")
Expand Down
7 changes: 0 additions & 7 deletions pleskdistup/common/src/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@
# Returns standard output
def logged_check_call(cmd: typing.Union[typing.Sequence[str], str], **kwargs) -> str:
log.info(f"Running: {cmd!r}. Output:")

# I believe we should be able pass argument to the subprocess function
# from the caller. So we have to inject stdout/stderr/universal_newlines
kwargs["stdout"] = subprocess.PIPE
kwargs["stderr"] = subprocess.STDOUT
kwargs["universal_newlines"] = True

stdout = []

def proc_stdout(line: str) -> None:
Expand Down

0 comments on commit e8d9f70

Please sign in to comment.