Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

errors.py 573B

12345678910111213141516171819202122232425
  1. class StoreError(RuntimeError):
  2. pass
  3. class CredentialsNotFound(StoreError):
  4. pass
  5. class InitializationError(StoreError):
  6. pass
  7. def process_store_error(cpe, program):
  8. message = cpe.output.decode('utf-8')
  9. if 'credentials not found in native keychain' in message:
  10. return CredentialsNotFound(
  11. 'No matching credentials in {}'.format(
  12. program
  13. )
  14. )
  15. return StoreError(
  16. 'Credentials store {} exited with "{}".'.format(
  17. program, cpe.output.decode('utf-8').strip()
  18. )
  19. )