23 lines
783 B
Diff
23 lines
783 B
Diff
|
From 576008ff849392c1c801b0722d595a2369e11797 Mon Sep 17 00:00:00 2001
|
||
|
From: Davis Vann Bennett <davis.v.bennett@gmail.com>
|
||
|
Date: Wed, 14 Jul 2021 19:53:48 -0400
|
||
|
Subject: [PATCH] check for bytes return type and dictifiy it
|
||
|
|
||
|
---
|
||
|
fsspec/mapping.py | 2 ++
|
||
|
1 file changed, 2 insertions(+)
|
||
|
|
||
|
diff --git a/fsspec/mapping.py b/fsspec/mapping.py
|
||
|
index 17fe7ae7..235da8d2 100644
|
||
|
--- a/fsspec/mapping.py
|
||
|
+++ b/fsspec/mapping.py
|
||
|
@@ -88,6 +88,8 @@ def getitems(self, keys, on_error="raise"):
|
||
|
oe = on_error if on_error == "raise" else "return"
|
||
|
try:
|
||
|
out = self.fs.cat(keys2, on_error=oe)
|
||
|
+ if isinstance(out, bytes):
|
||
|
+ out = {keys2[0]: out}
|
||
|
except self.missing_exceptions as e:
|
||
|
raise KeyError from e
|
||
|
out = {
|