summaryrefslogtreecommitdiffstats
path: root/libvirt-override.py
diff options
context:
space:
mode:
authorMatthias Bolte <matthias.bolte@googlemail.com>2010-11-13 16:34:57 +0100
committerMatthias Bolte <matthias.bolte@googlemail.com>2010-11-14 22:45:59 +0100
commit1e025b834b7f5cdd677d29a6c78e3edbecc839a4 (patch)
treee2a099a5c2f2482dbc4c9b9bfe5a57e739a9274a /libvirt-override.py
parent84399ee7efcead19285540d410a183ad3e088527 (diff)
downloadlibvirt-python-split-1e025b834b7f5cdd677d29a6c78e3edbecc839a4.zip
libvirt-python-split-1e025b834b7f5cdd677d29a6c78e3edbecc839a4.tar.gz
libvirt-python-split-1e025b834b7f5cdd677d29a6c78e3edbecc839a4.tar.xz
Use python discovered through env instead of hardcoding a pathv0.8.7v0.8.6
This is more flexible regarding the location of the python binary but doesn't allow to pass the -u flag. The -i flag can be passed from inside the script using the PYTHONINSPECT env variable. This fixes a problem with the esx_vi_generator.py on FreeBSD.
Diffstat (limited to 'libvirt-override.py')
-rw-r--r--libvirt-override.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/libvirt-override.py b/libvirt-override.py
index d544a0e..909ebe3 100644
--- a/libvirt-override.py
+++ b/libvirt-override.py
@@ -2,6 +2,11 @@
# Manually written part of python bindings for libvirt
#
+# Specify -i commandline option after python was started
+if __name__ == "__main__":
+ import os
+ os.environ["PYTHONINSPECT"] = "1"
+
# On cygwin, the DLL is called cygvirtmod.dll
try:
import libvirtmod