aboutsummaryrefslogtreecommitdiff
path: root/scripts/qmp/qom-fuse
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/qmp/qom-fuse')
-rwxr-xr-xscripts/qmp/qom-fuse6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/qmp/qom-fuse b/scripts/qmp/qom-fuse
index 703a97e75f..0d11f73152 100755
--- a/scripts/qmp/qom-fuse
+++ b/scripts/qmp/qom-fuse
@@ -127,19 +127,19 @@ class QOMFuse(QOMCommand, Operations):
def read(self, path, size, offset, fh):
if not self.is_property(path):
- return -ENOENT
+ raise FuseOSError(ENOENT)
path, prop = path.rsplit('/', 1)
if path == '':
path = '/'
try:
- data = self.qmp.command('qom-get', path=path, property=prop)
+ data = str(self.qmp.command('qom-get', path=path, property=prop))
data += '\n' # make values shell friendly
except QMPResponseError as err:
raise FuseOSError(EPERM) from err
if offset > len(data):
- return ''
+ return b''
return bytes(data[offset:][:size], encoding='utf-8')