From 6e1e665417b4747ea0adb0350a30304f8bd190b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 2 Apr 2021 22:36:28 +0200 Subject: [PATCH] trivial: fix pylint duplicate-except warning (#52732) --- pylint.rc | 1 - wcs/publisher.py | 9 +++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/pylint.rc b/pylint.rc index 5ed3722c0..06e9e5b39 100644 --- a/pylint.rc +++ b/pylint.rc @@ -18,7 +18,6 @@ disable= deprecated-module, disallowed-name, duplicate-code, - duplicate-except, eval-used, exec-used, fixme, diff --git a/wcs/publisher.py b/wcs/publisher.py index 4dd588817..8633b484d 100644 --- a/wcs/publisher.py +++ b/wcs/publisher.py @@ -18,7 +18,6 @@ import json import os import pickle import re -import socket import sys import traceback import zipfile @@ -381,12 +380,10 @@ class WcsPublisher(StubWcsPublisher): return try: self.logger.log_internal_error(error_summary, plain_error_msg, tech_id) - except socket.error: - # will happen if there is no mail server available and exceptions - # were configured to be mailed. - pass except OSError: - # this could happen on file descriptor exhaustion + # Could happen if there is no mail server available and exceptions + # were configured to be mailed. (formerly socket.error) + # Could also could happen on file descriptor exhaustion. pass def record_error(self, *args, **kwargs):