Replace all instances of EnvironmentError with OSError
According to the text just above https://docs.python.org/3/library/exceptions.html#EnvironmentError, `EnvironmentError` has been an alias of `OSError` since Python 3.3. Replacing it makes the code more consistent since `OSError` is used in other places in the code too.
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ match_commands = tuple(sorted(all_commands + ('exit', 'help', 'quit')))
|
||||
def init_readline(readline):
|
||||
try:
|
||||
readline.read_init_file()
|
||||
except EnvironmentError:
|
||||
except OSError:
|
||||
if not is_macos:
|
||||
raise
|
||||
if 'libedit' in readline.__doc__:
|
||||
|
||||
Reference in New Issue
Block a user