aboutsummaryrefslogtreecommitdiff
path: root/bh20sequploader
diff options
context:
space:
mode:
Diffstat (limited to 'bh20sequploader')
-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" %