SamuraiWTF / katana

SamuraiWTF package management tool and interface.
20 stars 8 forks source link

Processes hang #18

Closed JGillam closed 4 years ago

JGillam commented 4 years ago

Processes that run commands are hanging in the CLI. Pressing q lets them continue.

The hypothesis is that this has something to do with the way output from the command is being captured. A repeatable example of this is when a katana status command is run, and a service status is checked. Currently we are using process.call(...) but as of Python 3.5 this is no longer recommended. The Python subprocess module recommends using process.run(...) as of Python 3.5.

This should not be a problem to change since we are running Python 3.8 in Ubuntu and 3.7 in AWS.

JGillam commented 4 years ago

ok, figured this out. My hypothesis was wrong. Though I don't see any issue with moving forward with switching to process.run(...) as that provides a bit more flexibility in the command and is recommended over call.

The issue is that the pager is turned on by default when checking the status of a service. When running from a script, all we need to do is add a --no-pager parameter and this problem will go away.