Na wykonanie poniżej kodu otrzymuję poniżej błędu, jeśli nie dostać firefox profil/webdriver z jakiegoś powodu:wyjątki muszą być zajęcia w starym stylu lub pochodzi z BaseException nie NoneType
wyjątki muszą być w starym stylu klas lub pochodzące z BaseException nie NoneType
chcę zrozumieć, dlaczego ten błąd jest wyświetlany w tym przypadku:
self.error = 0
self.profile, profileErrStatus = self.GetFireFoxProfile(path)
if self.profile:
self.driver, driverErrStatus = self.GetFireFoxWebDriver(self.profile)
if self.driver:
else:
print('Failed to get Firefox Webdriver:%s'%(str(sys.exc_info()[0])))
raise
else:
print('Failed to get Firefox Profile:%s'%(str(sys.exc_info()[0])))
raise