mirror of
http://aero2k.de/t/repos/urlbot-native.git
synced 2017-09-06 15:25:38 +02:00
cleanup; pylint suggestions
This commit is contained in:
@@ -5,7 +5,7 @@ if '__main__' == __name__:
|
|||||||
print('''this is a library file, which is not meant to be executed''')
|
print('''this is a library file, which is not meant to be executed''')
|
||||||
exit(-1)
|
exit(-1)
|
||||||
|
|
||||||
import sys, os, time, pickle
|
import sys, time, pickle
|
||||||
from local_config import conf
|
from local_config import conf
|
||||||
|
|
||||||
RATE_GLOBAL = 0x01
|
RATE_GLOBAL = 0x01
|
||||||
|
|||||||
@@ -625,7 +625,7 @@ if debug_enabled():
|
|||||||
def _send_reply(a, msg_obj):
|
def _send_reply(a, msg_obj):
|
||||||
logger('send_reply[%s]' % msg_obj, a)
|
logger('send_reply[%s]' % msg_obj, a)
|
||||||
|
|
||||||
def _conf(a):
|
def _conf(ignored):
|
||||||
return 'bot'
|
return 'bot'
|
||||||
|
|
||||||
def _ratelimit_exceeded(ignored=None):
|
def _ratelimit_exceeded(ignored=None):
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import sys, os, stat, re, time, pickle, random
|
import sys, re, time, pickle, random
|
||||||
import urllib.request, urllib.parse, urllib.error, html.parser
|
import urllib.request, urllib.parse, urllib.error, html.parser
|
||||||
from common import *
|
from common import *
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from local_config import conf, set_conf
|
from local_config import conf, set_conf
|
||||||
except ImportError:
|
except ImportError:
|
||||||
import sys
|
|
||||||
sys.stderr.write('''
|
sys.stderr.write('''
|
||||||
%s: E: local_config.py isn't tracked because of included secrets and
|
%s: E: local_config.py isn't tracked because of included secrets and
|
||||||
%s site specific configurations. Rename local_config.py.skel and
|
%s site specific configurations. Rename local_config.py.skel and
|
||||||
@@ -281,11 +280,10 @@ class bot(ClientXMPP):
|
|||||||
if 'groupchat' == msg_obj['type']:
|
if 'groupchat' == msg_obj['type']:
|
||||||
return
|
return
|
||||||
|
|
||||||
plugins.data_parse_commands(msg_obj)
|
# plugins.data_parse_commands(msg_obj)
|
||||||
plugins.data_parse_other(msg_obj)
|
# plugins.data_parse_other(msg_obj)
|
||||||
|
|
||||||
print('msg from %s: %s' % (msg_obj['from'].bare, msg_obj))
|
print('msg from %s: %s' % (msg_obj['from'].bare, msg_obj))
|
||||||
# msg_obj.reply(body='waaaaah').send()
|
|
||||||
|
|
||||||
if '__main__' == __name__:
|
if '__main__' == __name__:
|
||||||
import plugins
|
import plugins
|
||||||
|
|||||||
Reference in New Issue
Block a user