qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL for-2.10 13/15] tests: migration/guestperf Python 2.6


From: Stefan Hajnoczi
Subject: [Qemu-devel] [PULL for-2.10 13/15] tests: migration/guestperf Python 2.6 argparse compatibility
Date: Thu, 31 Aug 2017 09:22:08 +0100

Add the scripts/ directory to sys.path so Python 2.6 will be able to
import argparse.

Cc: Daniel P. Berrange <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Acked-by: John Snow <address@hidden>
Acked-by: Fam Zheng <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
 tests/migration/guestperf/shell.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tests/migration/guestperf/shell.py 
b/tests/migration/guestperf/shell.py
index 185c5697a6..7992459a97 100644
--- a/tests/migration/guestperf/shell.py
+++ b/tests/migration/guestperf/shell.py
@@ -18,12 +18,14 @@
 #
 
 
-import argparse
-import fnmatch
 import os
 import os.path
-import platform
 import sys
+sys.path.append(os.path.join(os.path.dirname(__file__),
+                             '..', '..', '..', 'scripts'))
+import argparse
+import fnmatch
+import platform
 
 from guestperf.hardware import Hardware
 from guestperf.engine import Engine
-- 
2.13.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]