From 9c2acb15291c018f722f0da8f78bf51f97d41629 Mon Sep 17 00:00:00 2001 From: Josh Walawender Date: Tue, 5 Dec 2023 16:02:45 -1000 Subject: [PATCH] Handle hostname with full .keck.hawaii.edu --- ddoitranslatormodule/cli_interface.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ddoitranslatormodule/cli_interface.py b/ddoitranslatormodule/cli_interface.py index ffd0fc1..c6aec29 100644 --- a/ddoitranslatormodule/cli_interface.py +++ b/ddoitranslatormodule/cli_interface.py @@ -194,6 +194,8 @@ def create_logger(): date_str = date.strftime('%Y%b%d').lower() hostname = socket.gethostname() + if hostname[-16:] == '.keck.hawaii.edu': + hostname = hostname[:-16] if hostname.lower() in ['kpf', 'vm-kpf', 'kpffiuserver', 'kpfserver']: logdir = Path(f"/s/sdata1701/KPFTranslator_logs/{date_str}/cli_logs") elif hostname.lower() in ['vm-ddoiserverbuild', 'vm-ddoiserver']: