Fixed some python errors; added a message to clue someone in to an out of date version of makemkv.

This commit is contained in:
ac3d912 2014-06-27 14:47:38 -04:00
parent 7f923f8ce0
commit 8bd206f475

View file

@ -82,9 +82,9 @@ class MakeMkvInteraction:
except IOError: except IOError:
pass pass
if proc.poll() : if proc.poll() :
if proc.proc != 0 : if proc.returncode != 0 :
self.message(_(50070)) self.log.error("makemkvcon error'd out! May require update. (Return Code: %s)" % proc.returncode)
return -1 return -1
xbmc.sleep(1000) xbmc.sleep(1000)
timeSlept = timeSlept + 1 timeSlept = timeSlept + 1
if timeSlept > self.settings.waitTimeOut : if timeSlept > self.settings.waitTimeOut :
@ -93,20 +93,22 @@ class MakeMkvInteraction:
def killMkv(self): def killMkv(self):
# Linux # Linux
try : if os.name == 'posix':
self.log.info('attempting linux kill of makemkvcon') try :
subprocess.call('killall -9 makemkvcon', shell=True) self.log.info('attempting linux kill of makemkvcon')
self.log.info('Linux call successful') subprocess.call('killall -9 makemkvcon', shell=True)
except: self.log.info('Linux call successful')
pass except:
pass
#Windows. #Windows.
try : if os.name == 'nt':
self.log.info('attempting windows kill of makemkvcon') try :
subprocess.call('taskkill /F /IM makemkvcon.exe', shell=True) self.log.info('attempting windows kill of makemkvcon')
self.log.info('Windows call successful') subprocess.call('taskkill /F /IM makemkvcon.exe', shell=True)
except: self.log.info('Windows call successful')
pass except:
pass
def makeMkvExists(self): def makeMkvExists(self):
(fin, fout) = os.popen4('%s -r' %(self.settings.mkvLocation)) (fin, fout) = os.popen4('%s -r' %(self.settings.mkvLocation))