2018-02-15, 02:07
One of the KODI developers pointed me to the UWP FAQ and I assume this is the issue:
Python _subprocess module is not available on UWP, so an author of the add-on must work around or not use it for UWP.
The following lines:
import subprocess, shutil, time
and…
def popenWithTimeout( command, timeout ):
log_lines = []
try:
p = subprocess.Popen( command, stdout=subprocess.PIPE, stderr=subprocess.PIPE )
except OSError:
log_lines.append( 'error finding external script, terminating' )
return False, log_lines
except Exception as e:
log_lines.append( 'unknown error while attempting to run %s' % command )
log_lines.append( e )
return False, log_lines
for t in xrange( timeout * 4 ):
time.sleep( 0.25 )
if p.poll() is not None:
return p.communicate(), ''
p.kill()
log_lines.append( 'script took too long to run, terminating' )
return False, log_lines
Thanks!
Python _subprocess module is not available on UWP, so an author of the add-on must work around or not use it for UWP.
The following lines:
import subprocess, shutil, time
and…
def popenWithTimeout( command, timeout ):
log_lines = []
try:
p = subprocess.Popen( command, stdout=subprocess.PIPE, stderr=subprocess.PIPE )
except OSError:
log_lines.append( 'error finding external script, terminating' )
return False, log_lines
except Exception as e:
log_lines.append( 'unknown error while attempting to run %s' % command )
log_lines.append( e )
return False, log_lines
for t in xrange( timeout * 4 ):
time.sleep( 0.25 )
if p.poll() is not None:
return p.communicate(), ''
p.kill()
log_lines.append( 'script took too long to run, terminating' )
return False, log_lines
Thanks!