diff options
Diffstat (limited to 'scripts/qmp/qom-fuse')
-rwxr-xr-x | scripts/qmp/qom-fuse | 6 |
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') |