Ignore some flake8 errors
This commit is contained in:
parent
680505a912
commit
524efe3c2a
4 changed files with 10 additions and 10 deletions
|
@ -168,14 +168,14 @@ class Buffer(QtCore.QObject):
|
|||
try:
|
||||
self.widget.set_title(
|
||||
color.remove(self.data['title'].decode('utf-8')))
|
||||
except:
|
||||
except: # noqa: E722
|
||||
self.widget.set_title(None)
|
||||
|
||||
def update_prompt(self):
|
||||
"""Update prompt."""
|
||||
try:
|
||||
self.widget.set_prompt(self.data['local_variables']['nick'])
|
||||
except:
|
||||
except: # noqa: E722
|
||||
self.widget.set_prompt(None)
|
||||
|
||||
def input_text_sent(self, text):
|
||||
|
|
|
@ -329,7 +329,7 @@ class MainWindow(QtGui.QMainWindow):
|
|||
forcecolor='#008800')
|
||||
self.debug_display(0, '', 'Message: %s' % message)
|
||||
self.parse_message(message)
|
||||
except:
|
||||
except: # noqa: E722
|
||||
print('Error while decoding message from WeeChat:\n%s'
|
||||
% traceback.format_exc())
|
||||
self.network.disconnect_weechat()
|
||||
|
|
|
@ -91,7 +91,7 @@ class Color():
|
|||
try:
|
||||
index = int(color)
|
||||
return '\x01(Fr%s)' % self.color_options[index]
|
||||
except:
|
||||
except: # noqa: E722
|
||||
print('Error decoding WeeChat color "%s"' % color)
|
||||
return ''
|
||||
|
||||
|
@ -99,7 +99,7 @@ class Color():
|
|||
try:
|
||||
index = int(color)
|
||||
return '\x01(%s%s#%s)' % (fg_bg, attrs, self._rgb_color(index))
|
||||
except:
|
||||
except: # noqa: E722
|
||||
print('Error decoding terminal color "%s"' % color)
|
||||
return ''
|
||||
|
||||
|
@ -122,7 +122,7 @@ class Color():
|
|||
index = int(color)
|
||||
return self._convert_terminal_color(fg_bg, attrs,
|
||||
WEECHAT_BASIC_COLORS[index][1])
|
||||
except:
|
||||
except: # noqa: E722
|
||||
print('Error decoding color "%s"' % color)
|
||||
return ''
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ class TestProto(object):
|
|||
try:
|
||||
self.sock = socket.socket(inet, socket.SOCK_STREAM)
|
||||
self.sock.connect((self.args.hostname, self.args.port))
|
||||
except:
|
||||
except: # noqa: E722
|
||||
if self.sock:
|
||||
self.sock.close()
|
||||
print('Failed to connect to', self.address)
|
||||
|
@ -80,7 +80,7 @@ class TestProto(object):
|
|||
self.has_quit = True
|
||||
self.sock.sendall(msg + '\n')
|
||||
print('\x1b[33m<-- ' + msg + '\x1b[0m')
|
||||
except:
|
||||
except: # noqa: E722
|
||||
traceback.print_exc()
|
||||
print('Failed to send message')
|
||||
return False
|
||||
|
@ -105,7 +105,7 @@ class TestProto(object):
|
|||
protocol.hex_and_ascii(msgd.uncompressed, 20)))
|
||||
# display decoded message
|
||||
print('\x1b[32m--> {0}\x1b[0m'.format(msgd))
|
||||
except:
|
||||
except: # noqa: E722
|
||||
traceback.print_exc()
|
||||
print('Error while decoding message from WeeChat')
|
||||
return False
|
||||
|
@ -181,7 +181,7 @@ class TestProto(object):
|
|||
recvbuf = ''
|
||||
sys.stdout.write(prompt + message)
|
||||
sys.stdout.flush()
|
||||
except:
|
||||
except: # noqa: E722
|
||||
traceback.print_exc()
|
||||
self.send('quit')
|
||||
return 0
|
||||
|
|
Loading…
Reference in a new issue