Skip to content

Commit 7d2d537

Browse files
committed
fix unused imports + trivial code style issues in main.py and tools/run.py
1 parent 9d716d9 commit 7d2d537

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

easybuild/main.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777
from easybuild.tools.output import COLOR_GREEN, COLOR_RED, STATUS_BAR, colorize, print_checks, rich_live_cm
7878
from easybuild.tools.output import start_progress_bar, stop_progress_bar, update_progress_bar
7979
from easybuild.tools.robot import check_conflicts, dry_run, missing_deps, resolve_dependencies, search_easyconfigs
80-
from easybuild.tools.run import RunShellCmdError
8180
from easybuild.tools.package.utilities import check_pkg_support
8281
from easybuild.tools.parallelbuild import submit_jobs
8382
from easybuild.tools.repository.repository import init_repository

easybuild/tools/run.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@
5050

5151
import easybuild.tools.asyncprocess as asyncprocess
5252
from easybuild.base import fancylogger
53-
from easybuild.base.exceptions import LoggedException
54-
from easybuild.tools.build_log import EasyBuildError, dry_run_msg, print_error, print_msg, time_str_since
53+
from easybuild.tools.build_log import EasyBuildError, dry_run_msg, print_msg, time_str_since
5554
from easybuild.tools.config import ERROR, IGNORE, WARN, build_option
5655
from easybuild.tools.hooks import RUN_SHELL_CMD, load_hooks, run_hook
5756
from easybuild.tools.utilities import trace_msg
@@ -151,9 +150,6 @@ def raise_run_shell_cmd_error(cmd, exit_code, work_dir, output, stderr):
151150
# 3) run_cmd_cache decorator
152151
# 4) actual caller site
153152
frameinfo = inspect.getouterframes(inspect.currentframe())[3]
154-
caller_file_name = frameinfo.filename
155-
caller_line_nr = frameinfo.lineno
156-
caller_function_name = frameinfo.function
157153
caller_info = (frameinfo.filename, frameinfo.lineno, frameinfo.function)
158154

159155
raise RunShellCmdError(cmd, exit_code, work_dir, output, stderr, caller_info)
@@ -290,7 +286,7 @@ def to_cmd_str(cmd):
290286

291287
# return output as a regular string rather than a byte sequence (and non-UTF-8 characters get stripped out)
292288
output = proc.stdout.decode('utf-8', 'ignore')
293-
stderr= proc.stderr.decode('utf-8', 'ignore') if split_stderr else None
289+
stderr = proc.stderr.decode('utf-8', 'ignore') if split_stderr else None
294290

295291
res = RunShellCmdResult(cmd=cmd_str, exit_code=proc.returncode, output=output, stderr=stderr, work_dir=work_dir)
296292

0 commit comments

Comments
 (0)