Fix PEP 8 compliance

This commit is contained in:
Alexei Sorokin 2016-08-19 16:50:46 +03:00
parent b5ea9cf6d2
commit f301397589

View File

@ -1,13 +1,13 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import signal
import sys
import time
import signal
import re
import sleekxmpp
from irc.bot import SingleServerIRCBot
from threading import Thread
from irc.bot import SingleServerIRCBot
import sleekxmpp
if sys.version_info.major >= 3:
from configparser import SafeConfigParser
else:
@ -130,7 +130,8 @@ class XMPPBot:
muc_plugin = self.client.plugin['xep_0045']
if self.muc in muc_plugin.getJoinedRooms():
muc_plugin.leaveMUC(self.muc, self.nick, msg='Replaced by new connection')
muc_plugin.leaveMUC(self.muc, self.nick,
msg='Replaced by new connection')
muc_plugin.joinMUC(self.muc, self.nick, wait=True)
def on_session_start(self, event):
@ -319,7 +320,8 @@ if __name__ == '__main__':
config.read('config.ini')
if not config.sections():
sys.stderr.write('Error: Configuration file does not exist or is empty.\n')
sys.stderr.write('Error: Configuration file does not exist ' +
'or is empty.\n')
sys.exit(1)
shared_opts['prefix'] = config.get('Shared', 'prefix')