Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nilrt_snac: fix misspelled enum #23

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions nilrt_snac/_pre_reqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
def _check_euid_root():
print("Checking EUID")
if os.geteuid() != 0:
raise SNACError("This script must be run as root.", Errors.EX_BAD_ENVIRONEMNT)
raise SNACError("This script must be run as root.", Errors.EX_BAD_ENVIRONMENT)


# Check that iptables is available.
Expand Down Expand Up @@ -39,13 +39,13 @@ def _check_iptables():
def _check_runmode():
safe_mode = pathlib.Path("/etc/natinst/safemode")
if safe_mode.exists():
raise SNACError("This script cannot be run in safe mode.", Errors.EX_BAD_ENVIRONEMNT)
raise SNACError("This script cannot be run in safe mode.", Errors.EX_BAD_ENVIRONMENT)


# Check that the script is running on NI LinuxRT
def _check_nilrt():
if get_distro() != "nilrt":
raise SNACError("This script must be run on a NILRT system.", Errors.EX_BAD_ENVIRONEMNT)
raise SNACError("This script must be run on a NILRT system.", Errors.EX_BAD_ENVIRONMENT)


def verify_prereqs(): # noqa: D103 - Missing docstring in public function (auto-generated noqa)
Expand Down