aboutsummaryrefslogtreecommitdiff
path: root/bh20sequploader/main.py
diff options
context:
space:
mode:
authorPjotr Prins2020-05-06 09:03:08 -0500
committerPjotr Prins2020-05-06 09:03:08 -0500
commit0031e778ee1ad8b934411da5082fcb3115646e67 (patch)
treebe17fb9aff6351e967a9210cd4c58a60ad55a382 /bh20sequploader/main.py
parent7d7af6cde75d09da7a05cf5bc05ef2556c3aea92 (diff)
parentb6d846b5de6c67b28adab1fa520953115a1a1e30 (diff)
downloadbh20-seq-resource-0031e778ee1ad8b934411da5082fcb3115646e67.tar.gz
bh20-seq-resource-0031e778ee1ad8b934411da5082fcb3115646e67.tar.lz
bh20-seq-resource-0031e778ee1ad8b934411da5082fcb3115646e67.zip
Merge branch 'master' of github.com:arvados/bh20-seq-resource
Diffstat (limited to 'bh20sequploader/main.py')
-rw-r--r--bh20sequploader/main.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/bh20sequploader/main.py b/bh20sequploader/main.py
index 4c4711d..10d1029 100644
--- a/bh20sequploader/main.py
+++ b/bh20sequploader/main.py
@@ -62,11 +62,16 @@ def main():
external_ip = urllib.request.urlopen('https://ident.me').read().decode('utf8')
+ try:
+ username = getpass.getuser()
+ except KeyError:
+ username = "unknown"
+
properties = {
"sequence_label": seqlabel,
"upload_app": "bh20-seq-uploader",
"upload_ip": external_ip,
- "upload_user": "%s@%s" % (getpass.getuser(), socket.gethostname())
+ "upload_user": "%s@%s" % (username, socket.gethostname())
}
col.save_new(owner_uuid=UPLOAD_PROJECT, name="%s uploaded by %s from %s" %