3 Replies Latest reply on Oct 25, 2012 11:01 AM by areohbee

    LrTasks.execute not getting correct return code

    PaulWaldo Level 1

      Hi all,

       

      I'm writing an Export Filter Provider that, in the postProcessRenderedPhotos function, calls an external Python script like this:

       

                  exitStatus = LrTasks.execute(command)

                  log:debug("Task returned, exit status is " .. exitStatus)

                  if exitStatus ~= 0 then

                     ...

       

      At the end of my Python script, I use

      sys.exit(0)

      and have verified that running of the script indeed returns 0 by running it in the shell and then checking the return code

      echo $?

      returns 0

       

      Whenever I run this script from my Export Plugin, I always get an exitStatus of 256.  Any ideas on what I'm doing wrong?  Thanks!