Skip to content

Commit 336d5b0

Browse files
authored
Merge pull request #4 from boegel/get_cwd
move `CWD_NOTFOUND_ERROR` constant to `tools.build_log`
2 parents c3af7a8 + 27526c7 commit 336d5b0

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

easybuild/tools/build_log.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@
6161
DRY_RUN_SOFTWARE_INSTALL_DIR = None
6262
DRY_RUN_MODULES_INSTALL_DIR = None
6363

64+
CWD_NOTFOUND_ERROR = (
65+
"Current working directory does not exist! It was either unexpectedly removed "
66+
"by an external process to EasyBuild or the filesystem is misbehaving."
67+
)
68+
6469

6570
DEVEL_LOG_LEVEL = logging.DEBUG - 1
6671
logging.addLevelName(DEVEL_LOG_LEVEL, 'DEVEL')

easybuild/tools/filetools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@
6262

6363
from easybuild.base import fancylogger
6464
# import build_log must stay, to use of EasyBuildLog
65-
from easybuild.tools.build_log import EasyBuildError, dry_run_msg, print_msg, print_warning
65+
from easybuild.tools.build_log import EasyBuildError, CWD_NOTFOUND_ERROR, dry_run_msg, print_msg, print_warning
6666
from easybuild.tools.config import ERROR, GENERIC_EASYBLOCK_PKG, IGNORE, WARN, build_option, install_path
6767
from easybuild.tools.output import PROGRESS_BAR_DOWNLOAD_ONE, start_progress_bar, stop_progress_bar, update_progress_bar
6868
from easybuild.tools.hooks import load_source
69-
from easybuild.tools.run import CWD_NOTFOUND_ERROR, run_shell_cmd
69+
from easybuild.tools.run import run_shell_cmd
7070
from easybuild.tools.utilities import natural_keys, nub, remove_unwanted_chars, trace_msg
7171

7272
try:

easybuild/tools/run.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
from threading import get_ident as get_thread_id
6464

6565
from easybuild.base import fancylogger
66-
from easybuild.tools.build_log import EasyBuildError, dry_run_msg, print_msg, time_str_since
66+
from easybuild.tools.build_log import EasyBuildError, CWD_NOTFOUND_ERROR, dry_run_msg, print_msg, time_str_since
6767
from easybuild.tools.config import build_option
6868
from easybuild.tools.hooks import RUN_SHELL_CMD, load_hooks, run_hook
6969
from easybuild.tools.utilities import trace_msg
@@ -83,11 +83,6 @@
8383
"ulimit -u", # used in det_parallelism
8484
)
8585

86-
CWD_NOTFOUND_ERROR = (
87-
"Current working directory does not exist! It was either unexpectedly removed "
88-
"by an external process to EasyBuild or the filesystem is misbehaving."
89-
)
90-
9186
RunShellCmdResult = namedtuple('RunShellCmdResult', ('cmd', 'exit_code', 'output', 'stderr', 'work_dir',
9287
'out_file', 'err_file', 'thread_id', 'task_id'))
9388

0 commit comments

Comments
 (0)