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

Added file=sys.stderr in some prints #157

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/fprime_gds/executables/comm.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def main():
)
fprime_gds.common.communication.checksum = args.checksum_type
if args.comm_adapter == "none":
print("[ERROR] Comm adapter set to 'none'. Nothing to do but exit.")
print("[ERROR] Comm adapter set to 'none'. Nothing to do but exit.", file=sys.stderr)
sys.exit(-1)

# Create the handling components for either side of this script, adapter for hardware, and ground for the GDS side
Expand Down
2 changes: 1 addition & 1 deletion src/fprime_gds/executables/run_deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def main():
if parsed_args.adapter == "ip":
launchers.append(launch_app)
else:
print("[WARNING] App cannot be auto-launched without IP adapter")
print("[WARNING] App cannot be auto-launched without IP adapter", file=sys.stderr)

# Launch the desired GUI package
if parsed_args.gui == "html":
Expand Down
19 changes: 11 additions & 8 deletions src/fprime_gds/executables/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,12 @@ def get_artifacts_root() -> Path:
ini_settings = IniSettings.load(ini_file)
except FprimeLocationUnknownException:
print(
"[ERROR] Not in fprime project and no deployment path provided, unable to find dictionary and/or app"
"[ERROR] Not in fprime project and no deployment path provided, unable to find dictionary and/or app",
file=sys.stderr
)
sys.exit(-1)
except FprimeSettingsException as e:
print("[ERROR]", e)
print("[ERROR]", e, file=sys.stderr)
sys.exit(-1)
assert (
"install_destination" in ini_settings
Expand All @@ -165,17 +166,18 @@ def find_app(root: Path) -> Path:
bin_dir = root / "bin"

if not bin_dir.exists():
print(f"[ERROR] binary location {bin_dir} does not exist")
print(f"[ERROR] binary location {bin_dir} does not exist", file=sys.stderr)
sys.exit(-1)

files = [child for child in bin_dir.iterdir() if child.is_file()]
if not files:
print(f"[ERROR] App not found in {bin_dir}")
print(f"[ERROR] App not found in {bin_dir}", file=sys.stderr)
sys.exit(-1)

if len(files) > 1:
print(
f"[ERROR] Multiple app candidates in binary location {bin_dir}. Specify app manually with --app."
f"[ERROR] Multiple app candidates in binary location {bin_dir}. Specify app manually with --app.",
file=sys.stderr
)
sys.exit(-1)

Expand All @@ -186,7 +188,7 @@ def find_dict(root: Path) -> Path:
dict_dir = root / "dict"

if not dict_dir.exists():
print(f"[ERROR] dictionary location {dict_dir} does not exist")
print(f"[ERROR] dictionary location {dict_dir} does not exist", file=sys.stderr)
sys.exit(-1)

files = [
Expand All @@ -196,12 +198,13 @@ def find_dict(root: Path) -> Path:
]

if not files:
print(f"[ERROR] No xml dictionary found in dictionary location {dict_dir}")
print(f"[ERROR] No xml dictionary found in dictionary location {dict_dir}", file=sys.stderr)
sys.exit(-1)

if len(files) > 1:
print(
f"[ERROR] Multiple xml dictionaries found in dictionary location {dict_dir}. Specify dictionary manually with --dictionary."
f"[ERROR] Multiple xml dictionaries found in dictionary location {dict_dir}. Specify dictionary manually with --dictionary.",
file=sys.stderr
)
sys.exit(-1)

Expand Down
Loading