Skip to content

Commit

Permalink
fix: allow for uid without username
Browse files Browse the repository at this point in the history
Since 1.26 (ab9a96e) we are seeing `ddsim` exceptions on certain Open Science Grid nodes/sites. Those sites appear to configure the running of singularity containers in such a way that no usernames are associated with the uid.
  • Loading branch information
wdconinc authored and andresailer committed Sep 15, 2023
1 parent ce7bfea commit 094aa6c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion DDG4/python/DDSim/Helper/Meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ def addParametersToRunHeader(sim):

# add User
import getpass
runHeader["User"] = getpass.getuser()
try:
runHeader["User"] = getpass.getuser()
except KeyError:
runHeader["User"] = str(os.getuid())

return runHeader

0 comments on commit 094aa6c

Please sign in to comment.