Skip to content

Commit

Permalink
Use getpass.getuser() instead of USER env var
Browse files Browse the repository at this point in the history
  • Loading branch information
taldcroft committed Oct 2, 2020
1 parent ee1d737 commit 34386c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ska_sync/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
=========
"""
import os
import getpass

import yaml

Expand Down Expand Up @@ -82,7 +83,7 @@ def main():
print('Loaded config from {}'.format(config_path))

# Remote user name
user = opt.user or config.get('user') or os.environ['USER']
user = opt.user or config.get('user') or getpass.getuser()

file_sync(config['file_sync'], user, config['host'])

Expand Down

0 comments on commit 34386c3

Please sign in to comment.