Skip to content

Commit 622201d

Browse files
authored
Fix issue 90 - empty manifest config support on Windows (#91)
* Fix issue 90 - empty manifest config support on Windows Signed-off-by: Sunny Carter <sunny.carter@metaswitch.com>
1 parent 209c9b9 commit 622201d

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ and **Merged pull requests**. Critical items to know are:
1414
The versions coincide with releases on pip. Only major versions will be released as tags on Github.
1515

1616
## [0.0.x](https://github.com/oras-project/oras-py/tree/main) (0.0.x)
17+
- patch fix for empty manifest config on Windows, closes issue [90](https://github.com/oras-project/oras-py/issues/90) (0.1.18)
1718
- patch fix to correct session url pattern, closes issue [78](https://github.com/oras-project/oras-py/issues/78) (0.1.17)
1819
- add support for tag deletion and retry decorators (0.1.16)
1920
- bugfix that pagination sets upper limit of 10K (0.1.15)

oras/oci.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def ManifestConfig(
128128
"""
129129
# Create an empty config if we don't have one
130130
if not path or not os.path.exists(path):
131-
path = "/dev/null"
131+
path = os.devnull
132132
conf = {
133133
"mediaType": media_type or oras.defaults.unknown_config_media_type,
134134
"size": 0,

oras/provider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ def download_blob(
430430
# Allow an empty layer to fail and return /dev/null
431431
except Exception as e:
432432
if digest == oras.defaults.blank_hash:
433-
return "/dev/null"
433+
return os.devnull
434434
raise e
435435
return outfile
436436

oras/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
__copyright__ = "Copyright The ORAS Authors."
33
__license__ = "Apache-2.0"
44

5-
__version__ = "0.1.17"
5+
__version__ = "0.1.18"
66
AUTHOR = "Vanessa Sochat"
77
EMAIL = "vsoch@users.noreply.github.com"
88
NAME = "oras"

0 commit comments

Comments
 (0)