dpp-nfc: More robust determination of the script directory
Make it more robust to import wpaspy regardless of how dpp-nfc.py is being executed. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
47323a6f50
commit
f85fb349fd
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ import ndef
|
|||
|
||||
import logging
|
||||
|
||||
scriptsdir = os.path.dirname(os.path.realpath("dpp-nfc.py"))
|
||||
scriptsdir = os.path.dirname(os.path.realpath(sys.modules[__name__].__file__))
|
||||
sys.path.append(os.path.join(scriptsdir, '..', '..', 'wpaspy'))
|
||||
import wpaspy
|
||||
|
||||
|
|
Loading…
Reference in a new issue