diff mbox

[v2,10/10] qtest.py: Few pylint/style fixes

Message ID 20170725150951.16038-11-ldoktor@redhat.com
State New
Headers show

Commit Message

Lukáš Doktor July 25, 2017, 3:09 p.m. UTC
No actual code changes, just few pylint/style fixes.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
---
 scripts/qtest.py | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

Comments

John Snow July 25, 2017, 5:19 p.m. UTC | #1
On 07/25/2017 11:09 AM, Lukáš Doktor wrote:
> No actual code changes, just few pylint/style fixes.
> 

More than welcome, given the state of our python scripts.

> Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
> ---
>   scripts/qtest.py | 11 +++++------
>   1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/scripts/qtest.py b/scripts/qtest.py
> index ab183c0..df0daf2 100644
> --- a/scripts/qtest.py
> +++ b/scripts/qtest.py
> @@ -11,14 +11,11 @@
>   # Based on qmp.py.
>   #
>   
> -import errno
>   import socket
> -import string
>   import os
> -import subprocess
> -import qmp.qmp
>   import qemu
>   
> +
>   class QEMUQtestProtocol(object):
>       def __init__(self, address, server=False):
>           """
> @@ -83,8 +80,10 @@ class QEMUQtestMachine(qemu.QEMUMachine):
>                    socket_scm_helper=None):
>           if name is None:
>               name = "qemu-%d" % os.getpid()
> -        super(QEMUQtestMachine, self).__init__(binary, args, name=name, test_dir=test_dir,
> -                                               socket_scm_helper=socket_scm_helper)
> +        super(QEMUQtestMachine,
> +              self).__init__(binary, args, name=name, test_dir=test_dir,
> +                             socket_scm_helper=socket_scm_helper)
> +        self._qtest = None
>           self._qtest_path = os.path.join(test_dir, name + "-qtest.sock")
>   
>       def _base_args(self):
> 

Reviewed-by: John Snow <jsnow@redhat.com>
diff mbox

Patch

diff --git a/scripts/qtest.py b/scripts/qtest.py
index ab183c0..df0daf2 100644
--- a/scripts/qtest.py
+++ b/scripts/qtest.py
@@ -11,14 +11,11 @@ 
 # Based on qmp.py.
 #
 
-import errno
 import socket
-import string
 import os
-import subprocess
-import qmp.qmp
 import qemu
 
+
 class QEMUQtestProtocol(object):
     def __init__(self, address, server=False):
         """
@@ -83,8 +80,10 @@  class QEMUQtestMachine(qemu.QEMUMachine):
                  socket_scm_helper=None):
         if name is None:
             name = "qemu-%d" % os.getpid()
-        super(QEMUQtestMachine, self).__init__(binary, args, name=name, test_dir=test_dir,
-                                               socket_scm_helper=socket_scm_helper)
+        super(QEMUQtestMachine,
+              self).__init__(binary, args, name=name, test_dir=test_dir,
+                             socket_scm_helper=socket_scm_helper)
+        self._qtest = None
         self._qtest_path = os.path.join(test_dir, name + "-qtest.sock")
 
     def _base_args(self):