mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-26 21:33:12 +00:00
batch 1 - update Python idiom to 3.7 using pyupgrade (#11341)
* batch 1 - update Python idiom to 3.7 using pyupgrade * add changelog frag * add changelog frag
This commit is contained in:
@@ -178,7 +178,7 @@ class PlainTextSocketAppender:
|
||||
while True:
|
||||
try:
|
||||
self._conn.send(to_bytes(multiline, errors="surrogate_or_strict"))
|
||||
except socket.error:
|
||||
except OSError:
|
||||
self.reopen_connection()
|
||||
continue
|
||||
break
|
||||
|
||||
@@ -89,7 +89,7 @@ def banner(self, msg, color=None, cows=True):
|
||||
msg = msg.strip()
|
||||
try:
|
||||
star_len = self.columns - get_text_width(msg) - timestamp_len
|
||||
except EnvironmentError:
|
||||
except OSError:
|
||||
star_len = self.columns - len(msg) - timestamp_len
|
||||
if star_len <= 3:
|
||||
star_len = 3
|
||||
|
||||
Reference in New Issue
Block a user