summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2011-01-15 03:30:26 +0100
committerUwe Hermann <uwe@hermann-uwe.de>2011-01-15 03:30:26 +0100
commit0895f56aa091fabc4761862f43020b53396ed9d5 (patch)
treec38b38decd9972da17318927e624787982daee98
parent5b05904dc5dd1182fdf381b66fbc4a7ad97e37aa (diff)
downloadlibsigrokdecode-0895f56aa091fabc4761862f43020b53396ed9d5.tar.gz
libsigrokdecode-0895f56aa091fabc4761862f43020b53396ed9d5.zip
Only load decoders from $(datadir)/sigrok/decoders.
Drop convenience locations which were supposed to allow running ./cli/sigrok-cli in the build directory. That will not really work fine due to some other reasons. We only support running sigrok-cli after an installation (into /usr/local or /opt or $HOME/sigrokinst or whatever).
-rw-r--r--decode.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/decode.c b/decode.c
index 3a1f63d..2cae1db 100644
--- a/decode.c
+++ b/decode.c
@@ -47,14 +47,11 @@ int sigrokdecode_init(void)
/* Py_Initialize() returns void and usually cannot fail. */
Py_Initialize();
- /* Add some more search directories for convenience. */
+ /* Add search directory for the protocol decoders. */
/* FIXME: Check error code. */
/* FIXME: What happens if this function is called multiple times? */
- PyRun_SimpleString(
- "import sys;"
- "sys.path.append('libsigrokdecode/decoders');"
- "sys.path.append('" DECODERS_DIR "');"
- );
+ PyRun_SimpleString("import sys;"
+ "sys.path.append('" DECODERS_DIR "');");
if (!(dir = opendir(DECODERS_DIR)))
return SIGROKDECODE_ERR_DECODERS_DIR;