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

feat: add development flag to scripts/configure.py #511

Merged
merged 4 commits into from
Nov 1, 2023
Merged
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion scripts/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,9 @@ def failed():
print(' WARNING: expected some arguments, check --help for more information')
if sys.version_info.major < 3 or sys.version_info.minor < 7:
print(' WARNING: minimum python version is 3.7')
install(os_deps=flags.os_deps, python_deps=flags.python_deps, web=flags.web,
result = install(os_deps=flags.os_deps, python_deps=flags.python_deps, web=flags.web,
display=flags.display, audiodetector=flags.audiodetector,
firmware=flags.firmware, password=flags.password,
restart_updater=flags.restart_updater)
if not result:
sys.exit(1)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note to self: test that updater successfully restarts after this change, cuz it uses subprocess.Popen to call this and may care about exit status.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Subprocess only exceptions on non-zero exit when check_call()/check_output() are used: https://docs.python.org/3/library/subprocess.html#exceptions

since our use of the Popen constructor is basically throwaway ("send the reboot command and return without waiting"), this seems safe. this also functioned correctly when I tested.

Loading