Skip to content

Commit

Permalink
Set errno on NotWritableError (conda#9789)
Browse files Browse the repository at this point in the history
The  `NotWritableError` exception does accept the `errno` argument, but does not pass it to `OSError` (its 2nd parent class). This causes the `errno` attribute to be unset (defaults to `None`).

Co-authored-by: Michael C. Grant <[email protected]>
  • Loading branch information
bfis and mcg1969 authored Nov 18, 2021
1 parent f99956d commit a953217
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions conda/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,7 @@ def __init__(self, path, errno, **kwargs):
'gid': os.getegid(),
})
super(NotWritableError, self).__init__(message, **kwargs)
self.errno = errno


class NoWritableEnvsDirError(CondaError):
Expand Down

0 comments on commit a953217

Please sign in to comment.