Permalink
Browse files

tools, Documentation: Adjust pyjailhouse import boilerplate documenta…

…tion

Move the comment when local imports must have happened before the line
that prevent them. Also fix the Python syntax in the example boilerplate
code.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
  • Loading branch information...
jan-kiszka committed Sep 9, 2018
1 parent c122226 commit d84d30beca2a35d5afa3268c0a3e2a35da880a9d
Showing with 6 additions and 10 deletions.
  1. +3 −4 Documentation/pyjailhouse.md
  2. +1 −2 tools/jailhouse-cell-linux
  3. +1 −2 tools/jailhouse-config-create
  4. +1 −2 tools/jailhouse-hardware-check
@@ -53,8 +53,7 @@ For the example, the following wouldn't work inside of boz.py:
**Boilerplate code, with sys.path[0] warning**
`
# Imports from directory containing this must be done before the following
sys.path[0] = os.path.dirname(os.path.abspath(__file__)) + ""
from pyjailhouse import
# Imports from directory containing this must be done above
# import statement, see python documentation on sys.path[0]
`
from pyjailhouse import *
`
@@ -17,10 +17,9 @@ import os
import struct
import sys
# Imports from directory containing this must be done before the following
sys.path[0] = os.path.dirname(os.path.abspath(__file__)) + "/.."
from pyjailhouse.cell import JailhouseCell
# Imports from directory containing this must be done above
# import statement, see python documentation on sys.path[0]
libexecdir = None
@@ -32,10 +32,9 @@ except ImportError:
print("This script requires the mako library to run.")
sys.exit(1)
# Imports from directory containing this must be done before the following
sys.path[0] = os.path.dirname(os.path.abspath(__file__)) + "/.."
import pyjailhouse.sysfs_parser as sysfs_parser
# Imports from directory containing this must be done above
# import statement, see python documentation on sys.path[0]
datadir = None
@@ -17,10 +17,9 @@ import os
import struct
import sys
# Imports from directory containing this must be done before the following
sys.path[0] = os.path.dirname(os.path.abspath(__file__)) + "/.."
import pyjailhouse.sysfs_parser as sysfs_parser
# Imports from directory containing this must be done above
# import statement, see python documentation on sys.path[0]
# just a dummy to make python2 happy
if sys.version_info[0] < 3:

0 comments on commit d84d30b

Please sign in to comment.