Fix bare 'except:' to placate errors in new flake8 version.

- fixes E722 errors from latest version of flake8
- requires us to not use 'bare except:' and catch BaseException instead
This commit is contained in:
Todd Gamblin
2017-10-23 16:51:11 +02:00
parent b98fc48273
commit 5449884b2e
17 changed files with 27 additions and 27 deletions

View File

@@ -166,7 +166,7 @@ def _file_descriptors_work(*streams):
for stream in streams:
stream.fileno()
return True
except:
except BaseException:
return False
@@ -310,7 +310,7 @@ def __enter__(self):
# need to pass this b/c multiprocessing closes stdin in child.
try:
input_stream = os.fdopen(os.dup(sys.stdin.fileno()))
except:
except BaseException:
input_stream = None # just don't forward input if this fails
self.process = multiprocessing.Process(
@@ -483,7 +483,7 @@ def _writer_daemon(self, stdin):
force_echo = True
if xoff in controls:
force_echo = False
except:
except BaseException:
tty.error("Exception occurred in writer daemon!")
traceback.print_exc()