From 7cbe450d0dd70ff6823a68c857cca81afeac23c1 Mon Sep 17 00:00:00 2001 From: Andreea Popescu Date: Fri, 15 Mar 2024 23:04:22 +0800 Subject: [PATCH] add to v2 --- b2sdk/v2/__init__.py | 3 ++- b2sdk/v2/raw_api.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/b2sdk/v2/__init__.py b/b2sdk/v2/__init__.py index fea5870ca..6bf066e13 100644 --- a/b2sdk/v2/__init__.py +++ b/b2sdk/v2/__init__.py @@ -13,6 +13,7 @@ from b2sdk._v3 import parse_folder as parse_sync_folder from b2sdk._v3 import AbstractPath as AbstractSyncPath from b2sdk._v3 import LocalPath as LocalSyncPath +from b2sdk.utils.escape import unprintable_to_hex, escape_control_chars, substitute_control_chars from .account_info import AbstractAccountInfo from .api import B2Api @@ -45,4 +46,4 @@ # large_file from .large_file import LargeFileServices -from .large_file import UnfinishedLargeFile \ No newline at end of file +from .large_file import UnfinishedLargeFile diff --git a/b2sdk/v2/raw_api.py b/b2sdk/v2/raw_api.py index f0da2ba42..d839d9a13 100644 --- a/b2sdk/v2/raw_api.py +++ b/b2sdk/v2/raw_api.py @@ -51,6 +51,9 @@ def get_upload_file_headers( **kwargs, ) + def unprintable_to_hex(self, s): + return v3.unprintable_to_hex(s) + @_file_infos_rename def upload_file( self,