-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test whether postgres user exists (#25)
So far, `pgsu` only tried the "sudo route" when it detected that it was running on Ubuntu Linux. It was reported that this test can fail when running on Windows Subsystem for Linux. Furthermore, this test might be too strict and exclude other Linux distributions with similar postgresql setup (unverified). Here, we switch from the check of the distribution name to a check whether the `postgres` system user exists. Furthermore, we introduce the `try_sudo` and `postgres_unix_user` constructor arguments, which can be used to force `pgsu` to try the "sudo route" for a given unix user.
- Loading branch information
Showing
4 changed files
with
29 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,7 @@ __pycache__ | |
*.pyc | ||
.tox/ | ||
*.egg-info | ||
.idea | ||
.vscode | ||
build/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
[tool.pylint.format] | ||
max-line-length = 120 | ||
max-args = 7 | ||
|
||
[tool.pytest.ini_options] | ||
addopts = "--durations=0 --cov=pgsu" |