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

getuser() on w32 can raise ImportError #90

Open
phdru opened this issue Aug 18, 2017 · 0 comments
Open

getuser() on w32 can raise ImportError #90

phdru opened this issue Aug 18, 2017 · 0 comments

Comments

@phdru
Copy link

phdru commented Aug 18, 2017

getuser() (called in clientparameters.py) can raise ImportError on Windows if LOGNAME/USER/etc environment variables are not defined. getpass.py tries to import pwd but pwd is Unix-only module and isn't available on Windows.

See a real life program failing at AppVeyor.

What would be the best way to fix? Make sure that LOGNAME/USER/etc environment variables are always defined? Or fix clientparameters.py to catch that ImportError? I can send a pull request.

phdru added a commit to sqlobject/py-postgresql that referenced this issue Aug 23, 2017
phdru added a commit to sqlobject/py-postgresql that referenced this issue Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant