Skip to content

Commit

Permalink
2.3.10 release
Browse files Browse the repository at this point in the history
  • Loading branch information
vgrem committed Jan 23, 2022
1 parent 0dc9274 commit 6e95d01
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions examples/sharepoint/files/download_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
download_path = os.path.join(tempfile.mkdtemp(), os.path.basename(file_url))
with open(download_path, "wb") as local_file:
file = ctx.web.get_file_by_server_relative_path(file_url).download(local_file).execute_query()
#file = ctx.web.get_file_by_server_relative_url(file_url).download(local_file).execute_query()
print("[Ok] file has been downloaded into: {0}".format(download_path))
4 changes: 2 additions & 2 deletions office365/runtime/auth/authentication_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __init__(self, authority_url):
self.authority_url = authority_url
self._provider = None

def with_client_certificate(self, tenant, client_id, thumbprint, cert_path,**kwargs):
def with_client_certificate(self, tenant, client_id, thumbprint, cert_path, **kwargs):
"""Creates authenticated SharePoint context via certificate credentials
:param str tenant: Tenant name, for example {}@
Expand All @@ -30,7 +30,7 @@ def with_client_certificate(self, tenant, client_id, thumbprint, cert_path,**kwa
def _acquire_token_for_client_certificate():
authority_url = 'https://login.microsoftonline.com/{0}'.format(tenant)
credentials = {"thumbprint": thumbprint, "private_key": open(cert_path).read()}
scopes=kwargs.get('scopes',["{url}/.default".format(url=self.authority_url)])
scopes = kwargs.get('scopes', ["{url}/.default".format(url=self.authority_url)])
import msal
app = msal.ConfidentialClientApplication(
client_id,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name="Office365-REST-Python-Client",
version="2.3.9",
version="2.3.10",
author="Vadim Gremyachev",
author_email="[email protected]",
maintainer="Konrad Gądek, Domenico Di Nicola",
Expand Down

0 comments on commit 6e95d01

Please sign in to comment.