Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #22 from machacekondra/perm_error
Browse files Browse the repository at this point in the history
Use OSError instead of PermissionError
  • Loading branch information
pcuzner committed Aug 6, 2019
2 parents 97d9dfe + e22cb45 commit 066728f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runner_service/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def ssh_create_key(ssh_dir, user=None):
format=serialization.PrivateFormat.TraditionalOpenSSL,
encryption_algorithm=serialization.NoEncryption()))

except (PermissionError, IOError) as err:
except (OSError, IOError) as err:
msg = "Unable to write to private key to '{}': {}".format(ssh_dir, err)
logger.critical(msg)
raise RunnerServiceError(msg)
Expand All @@ -144,7 +144,7 @@ def ssh_create_key(ssh_dir, user=None):
encoding=serialization.Encoding.OpenSSH,
format=serialization.PublicFormat.OpenSSH))

except (PermissionError, IOError) as err:
except (OSError, IOError) as err:
msg = "Unable to write public ssh key to {}: {}".format(ssh_dir, err)
logger.critical(msg)
raise RunnerServiceError(msg)
Expand Down

0 comments on commit 066728f

Please sign in to comment.