[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 17/72] scripts/qom-fuse: move to python/qemu/qmp/qom_fuse.py
From: |
John Snow |
Subject: |
[PULL 17/72] scripts/qom-fuse: move to python/qemu/qmp/qom_fuse.py |
Date: |
Fri, 18 Jun 2021 19:04:00 -0400 |
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>
---
scripts/qmp/qom-fuse => python/qemu/qmp/qom_fuse.py | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
rename scripts/qmp/qom-fuse => python/qemu/qmp/qom_fuse.py (95%)
mode change 100755 => 100644
diff --git a/scripts/qmp/qom-fuse b/python/qemu/qmp/qom_fuse.py
old mode 100755
new mode 100644
similarity index 95%
rename from scripts/qmp/qom-fuse
rename to python/qemu/qmp/qom_fuse.py
index a5a7a304a3..43f4671fdb
--- a/scripts/qmp/qom-fuse
+++ b/python/qemu/qmp/qom_fuse.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
"""
QEMU Object Model FUSE filesystem tool
@@ -35,7 +34,6 @@
import argparse
from errno import ENOENT, EPERM
-import os
import stat
import sys
from typing import (
@@ -50,10 +48,8 @@
import fuse
from fuse import FUSE, FuseOSError, Operations
-
-sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python'))
-from qemu.qmp import QMPResponseError
-from qemu.qmp.qom_common import QOMCommand
+from . import QMPResponseError
+from .qom_common import QOMCommand
fuse.fuse_python_api = (0, 2)
@@ -208,7 +204,3 @@ def readdir(self, path: str, fh: IO[bytes]) ->
Iterator[str]:
yield '..'
for item in self.qom_list(path):
yield item.name
-
-
-if __name__ == '__main__':
- sys.exit(QOMFuse.entry_point())
--
2.31.1
- [PULL 00/72] Python patches, John Snow, 2021/06/18
- [PULL 02/72] python/qmp: Fix type of SocketAddrT, John Snow, 2021/06/18
- [PULL 05/72] python/qmp: add qom script entry points, John Snow, 2021/06/18
- [PULL 07/72] scripts/qom-fuse: apply isort rules, John Snow, 2021/06/18
- [PULL 12/72] scripts/qom-fuse: Convert to QOMCommand, John Snow, 2021/06/18
- [PULL 14/72] scripts/qom-fuse: ensure QOMFuse.read always returns bytes, John Snow, 2021/06/18
- [PULL 06/72] scripts/qmp: redirect qom-xxx scripts to python/qemu/qmp/, John Snow, 2021/06/18
- [PULL 09/72] python: Add 'fh' to known-good variable names, John Snow, 2021/06/18
- [PULL 17/72] scripts/qom-fuse: move to python/qemu/qmp/qom_fuse.py,
John Snow <=
- [PULL 01/72] python/pipenv: Update Pipfile.lock, John Snow, 2021/06/18
- [PULL 08/72] scripts/qom-fuse: apply flake8 rules, John Snow, 2021/06/18
- [PULL 15/72] scripts/qom-fuse: add static type hints, John Snow, 2021/06/18
- [PULL 11/72] scripts/qom-fuse: Add docstrings, John Snow, 2021/06/18
- [PULL 16/72] python: add optional FUSE dependencies, John Snow, 2021/06/18
- [PULL 30/72] scripts/qemu-ga-client: Add forwarder shim, John Snow, 2021/06/18
- [PULL 35/72] scripts/qmp-shell: fix connect method signature, John Snow, 2021/06/18
- [PULL 32/72] scripts/qmp-shell: Apply flake8 rules, John Snow, 2021/06/18
- [PULL 38/72] scripts/qmp-shell: Use python3-style super(), John Snow, 2021/06/18
- [PULL 03/72] python/qmp: add parse_address classmethod, John Snow, 2021/06/18