18316: Propagate value of enable_write & don't try to save on flush
[arvados.git] / services / fuse / arvados_fuse / fusefile.py
index cedb4fb451cdf6fbdaefe0b4caa3a20ef424d69e..116b5462b6857aa3452ae59407af309cdaabe36b 100644 (file)
@@ -2,13 +2,15 @@
 #
 # SPDX-License-Identifier: AGPL-3.0
 
+from __future__ import absolute_import
+from builtins import bytes
 import json
 import llfuse
 import logging
 import re
 import time
 
-from fresh import FreshBase, convertTime
+from .fresh import FreshBase, convertTime
 
 _logger = logging.getLogger('arvados.arvados_fuse')
 
@@ -88,7 +90,7 @@ class StringFile(File):
         return len(self.contents)
 
     def readfrom(self, off, size, num_retries=0):
-        return self.contents[off:(off+size)]
+        return bytes(self.contents[off:(off+size)], encoding='utf-8')
 
 
 class ObjectFile(StringFile):