From e75b19bf015e810fcfddb8fe1d3ae30e1166c610 Mon Sep 17 00:00:00 2001 From: yedpodtrzitko Date: Mon, 19 Jun 2023 21:54:31 +0800 Subject: [PATCH] address code review feedback --- .github/workflows/cd.yml | 1 + b2/arg_parser.py | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 022808e88..356314d15 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -160,6 +160,7 @@ jobs: tags: backblaze/b2:${{ steps.build.outputs.version }} debian-release: + if: ${{ vars.B2_DEBIAN_BUCKET_UPLOAD_MISSING }} name: Build Debian Package uses: ./.github/workflows/cd_debian.yml secrets: inherit diff --git a/b2/arg_parser.py b/b2/arg_parser.py index c5ee214a0..4aeb73395 100644 --- a/b2/arg_parser.py +++ b/b2/arg_parser.py @@ -27,8 +27,14 @@ def rst2ansi(input_string, output_encoding='utf-8'): """Dummy replacement of rst2ansi which is not available in Debian.""" if isinstance(input_string, bytes): - return input_string.decode(output_encoding) - return input_string + input_string = input_string.decode(output_encoding) + + # remove double backticks + stripped = input_string.replace('``', '') + # remove code-block directive + stripped = stripped.replace('.. code-block::', '') + + return stripped _arrow_version = tuple(int(p) for p in arrow.__version__.split("."))