Skip to content

Commit

Permalink
fixes issue #29
Browse files Browse the repository at this point in the history
  • Loading branch information
dariobauer committed Feb 15, 2022
1 parent b637015 commit f890cc6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

* Fixed bug in download_file method when verbose was set to false (Issue [#29](https://github.com/dariobauer/graph-onedrive/issues/29))

## Released

Expand Down
2 changes: 1 addition & 1 deletion src/graph_onedrive/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.3.0"
__version__ = "0.3.1dev1"

import logging

Expand Down
3 changes: 2 additions & 1 deletion src/graph_onedrive/_onedrive.py
Original file line number Diff line number Diff line change
Expand Up @@ -1333,8 +1333,8 @@ async def _download_async_part(
# Build the Range HTTP header and add the auth header
headers = {"Range": f"bytes={start}-{end}"}
headers.update(self._headers)
part_name = part_file_path.suffix.lstrip(".")
if verbose:
part_name = part_file_path.suffix.lstrip(".")
print(
f"Starting download of file segment {part_name} (bytes {start}-{end})"
)
Expand All @@ -1352,6 +1352,7 @@ async def _download_async_part(
await fw.write(chunk)
if verbose:
print(f"Finished download of file segment {part_name}")
logger.debug(f"finished download segment={part_name}")

@token_required
def upload_file(
Expand Down

0 comments on commit f890cc6

Please sign in to comment.