scripts/qom-fuse: move to python/qemu/qmp/qom_fuse.py

Move qom-fuse over to the python package now that it passes the
linter. Update the import paradigms so that it continues to pass in the
context of the Python package.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210603003719.1321369-18-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
This commit is contained in:
John Snow 2021-06-02 20:37:17 -04:00
parent c63f3b0b29
commit 173d185de9

12
scripts/qmp/qom-fuse → python/qemu/qmp/qom_fuse.py Executable file → Normal file
View file

@ -1,4 +1,3 @@
#!/usr/bin/env python3
""" """
QEMU Object Model FUSE filesystem tool QEMU Object Model FUSE filesystem tool
@ -35,7 +34,6 @@ optional arguments:
import argparse import argparse
from errno import ENOENT, EPERM from errno import ENOENT, EPERM
import os
import stat import stat
import sys import sys
from typing import ( from typing import (
@ -50,10 +48,8 @@ from typing import (
import fuse import fuse
from fuse import FUSE, FuseOSError, Operations from fuse import FUSE, FuseOSError, Operations
from . import QMPResponseError
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python')) from .qom_common import QOMCommand
from qemu.qmp import QMPResponseError
from qemu.qmp.qom_common import QOMCommand
fuse.fuse_python_api = (0, 2) fuse.fuse_python_api = (0, 2)
@ -208,7 +204,3 @@ class QOMFuse(QOMCommand, Operations):
yield '..' yield '..'
for item in self.qom_list(path): for item in self.qom_list(path):
yield item.name yield item.name
if __name__ == '__main__':
sys.exit(QOMFuse.entry_point())