]> sigrok.org Git - libsigrokdecode.git/commitdiff
Only load decoders from $(datadir)/sigrok/decoders.
authorUwe Hermann <redacted>
Sat, 15 Jan 2011 02:30:26 +0000 (03:30 +0100)
committerUwe Hermann <redacted>
Sat, 15 Jan 2011 02:30:26 +0000 (03:30 +0100)
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).

decode.c

index 3a1f63da64147f47b2f86e81b8edf4889e12e9a5..2cae1dbbf0106768b9950fe9716ecafdab60dfe1 100644 (file)
--- 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;