lanl / dsi

LANL Data Science Infrastructure Project
https://lanl.github.io/dsi
5 stars 4 forks source link

os.getlogin() unreliable #22

Closed DanielRJohnson closed 1 year ago

DanielRJohnson commented 1 year ago

In dsi/plugins/env.py (currently in qwofford/issue14),

moniker = self.posix_info['moniker']

is unreliable and can give the following error when failing to grab the login:

Screen Shot 2023-06-13 at 8 50 38 AM

DanielRJohnson commented 1 year ago

Fixed in qwofford/issue14 by using getpass.getuser which does not crash when user's don't have a "controlling terminal", closed on successful merge