Skip to content

Commit 9e59d4e

Browse files
Merge pull request opensciencegrid#22 from brianhlin/SOFTWARE-5131.fix-python3-issues
Fix byte-string issue (SOFTWARE-5131)
2 parents ab395d5 + 301d3b1 commit 9e59d4e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎scripts/update-all-remote-wn-clients‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,12 @@ def call_updater(cfg, section, updater_script, log_dir, dry_run=False):
114114
log_file_path = os.path.join(log_dir, endpoint)
115115
with open(log_file_path, "ab") as log_file:
116116
log_file.write(b"-" * 79 + b"\n")
117+
now = datetime.datetime.now()
117118
log_file.write(
118119
b"Started at %s\nUser: %s\nCommand: %r\n\n"
119-
% (datetime.datetime.now(), local_user, cmd)
120+
% (now.strftime("%F %T").encode('latin-1'),
121+
local_user.encode('latin-1'),
122+
cmd)
120123
)
121124
log_file.flush()
122125
proc = Popen(

0 commit comments

Comments
 (0)