docker.py: Python 2.6 argparse compatibility
authorStefan Hajnoczi <stefanha@redhat.com>
Fri, 25 Aug 2017 15:57:31 +0000 (16:57 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Wed, 30 Aug 2017 11:02:11 +0000 (12:02 +0100)
Add the scripts/ directory to sys.path so Python 2.6 will be able to
import argparse.

Cc: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: John Snow <jsnow@redhat.com>
Acked-by: Fam Zheng <famz@redhat.com>
Message-id: 20170825155732.15665-3-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
tests/docker/docker.py

index ee40ca04d97ce767f89204cd205880364f7c8600..81c87ee32910e013ff50164e88f88ce029368c4f 100755 (executable)
 
 import os
 import sys
+sys.path.append(os.path.join(os.path.dirname(__file__),
+                             '..', '..', 'scripts'))
+import argparse
 import subprocess
 import json
 import hashlib
 import atexit
 import uuid
-import argparse
 import tempfile
 import re
 import signal