mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-17 17:43:06 -05:00
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
@ -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…
x
Reference in New Issue
Block a user