Skip to content

Commit a5081a9

Browse files
committed
fix error
1 parent 431e95e commit a5081a9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

cadence/connection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22

3+
import getpass
34
import os
45
import socket
56
from dataclasses import dataclass
@@ -194,7 +195,7 @@ def default_tchannel_headers():
194195
@staticmethod
195196
def default_application_headers():
196197
return {
197-
"user-name": os.environ.get("LOGNAME", os.getlogin()),
198+
"user-name": getpass.getuser(),
198199
"host-name": socket.gethostname(),
199200
# Copied from Java client
200201
"cadence-client-library-version": "2.2.0",

cadence/workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def exec_workflow(workflow_client, wm: WorkflowMethod, args, workflow_options: W
194194
start_request = create_start_workflow_request(workflow_client, wm, args)
195195
start_response, err = workflow_client.service.start_workflow(start_request)
196196
if err:
197-
raise Exception(err)
197+
raise Exception(repr(err))
198198
execution = WorkflowExecution(workflow_id=start_request.workflow_id, run_id=start_response.run_id)
199199
stub_instance._execution = execution
200200
return WorkflowExecutionContext(workflow_type=wm._name, workflow_execution=execution)

0 commit comments

Comments
 (0)