From: Stephen Soltesz Date: Thu, 12 Feb 2009 21:14:34 +0000 (+0000) Subject: lookup path relative to python installation. X-Git-Tag: Monitor-2.0-1~17 X-Git-Url: http://git.onelab.eu/?p=monitor.git;a=commitdiff_plain;h=9f276fbfd2372d76b85743b73f9729a5a0343d9c lookup path relative to python installation. --- diff --git a/pcucontrol/models/IntelAMT.py b/pcucontrol/models/IntelAMT.py index af201ba..61e820d 100644 --- a/pcucontrol/models/IntelAMT.py +++ b/pcucontrol/models/IntelAMT.py @@ -1,4 +1,5 @@ from pcucontrol.reboot import * +from distutils.sysconfig import get_python_lib; class IntelAMT(PCUControl): supported_ports = [16992] @@ -7,7 +8,7 @@ class IntelAMT(PCUControl): cmd = command.CMD() # TODO: need to make this path universal; not relative to pwd. - cmd_str = config.MONITOR_SCRIPT_ROOT + "/pcucontrol/models/intelamt/remoteControl" + cmd_str = get_python_lib(1) + "/pcucontrol/models/intelamt/remoteControl" if dryrun: # NOTE: -p checks the power state of the host.