From f63fc5f987aedcfcee80c84cde66fee6831aff23 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Wed, 8 Jan 2020 23:29:54 +0000 Subject: [PATCH] Collapse redundant exceptions In User.enqueue_input() combine a redundant match on BlockingIOError and OSError since the former is a subclass of the latter. This was caught by the B014 check introduced in flake8-bugbear 20.1.1. --- mudpy/misc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mudpy/misc.py b/mudpy/misc.py index ecab471..d753559 100644 --- a/mudpy/misc.py +++ b/mudpy/misc.py @@ -1,6 +1,6 @@ """Miscellaneous functions for the mudpy engine.""" -# Copyright (c) 2004-2019 mudpy authors. Permission to use, copy, +# Copyright (c) 2004-2020 mudpy authors. Permission to use, copy, # modify, and distribute this software is granted under terms # provided in the LICENSE file distributed with this software. @@ -850,7 +850,7 @@ class User: # check for some input try: raw_input = self.connection.recv(1024) - except (BlockingIOError, OSError): + except OSError: raw_input = b"" # we got something -- 2.11.0