From e20a6598eed989cc51267bd5ded7c572bd6af0db Mon Sep 17 00:00:00 2001 From: Jesse Vickery Date: Wed, 24 Dec 2025 14:36:03 +0000 Subject: [PATCH] fix(misc): log file bytes mode; - Byte mode for writing to log files. --- ckanapi/cli/batch.py | 2 +- ckanapi/cli/delete.py | 2 +- ckanapi/cli/dump.py | 2 +- ckanapi/cli/load.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ckanapi/cli/batch.py b/ckanapi/cli/batch.py index ab5dfab..855195a 100644 --- a/ckanapi/cli/batch.py +++ b/ckanapi/cli/batch.py @@ -42,7 +42,7 @@ def batch_actions(ckan, arguments, log = None if arguments['--log']: - log = open(arguments['--log'], 'a') + log = open(arguments['--log'], 'ab') jsonl_input = stdin if arguments['--input']: diff --git a/ckanapi/cli/delete.py b/ckanapi/cli/delete.py index f98f7f6..2d841ec 100644 --- a/ckanapi/cli/delete.py +++ b/ckanapi/cli/delete.py @@ -47,7 +47,7 @@ def delete_things(ckan, thing, arguments, log = None if arguments['--log']: - log = open(arguments['--log'], 'a') + log = open(arguments['--log'], 'ab') jsonl_input = stdin if arguments['--input']: diff --git a/ckanapi/cli/dump.py b/ckanapi/cli/dump.py index b2d2d2b..2a047f1 100644 --- a/ckanapi/cli/dump.py +++ b/ckanapi/cli/dump.py @@ -38,7 +38,7 @@ def dump_things(ckan, thing, arguments, log = None if arguments['--log']: - log = open(arguments['--log'], 'a') + log = open(arguments['--log'], 'ab') jsonl_output = stdout if arguments['--datapackages']: # TODO: do we want to just divert this to devnull? diff --git a/ckanapi/cli/load.py b/ckanapi/cli/load.py index 9ee8b2d..3273207 100644 --- a/ckanapi/cli/load.py +++ b/ckanapi/cli/load.py @@ -48,7 +48,7 @@ def load_things(ckan, thing, arguments, log = None if arguments['--log']: - log = open(arguments['--log'], 'a') + log = open(arguments['--log'], 'ab') jsonl_input = stdin if arguments['--input']: