Skip to content
This repository was archived by the owner on Aug 15, 2022. It is now read-only.

Commit 6052333

Browse files
author
Jeff Ammons
committed
Removing non-PEP8 changes to clean up PR
1 parent aff0446 commit 6052333

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ python-daemon
33
pyyaml
44
websocket-client
55
slackclient
6-
deamon

rtmbot.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import glob
88
import yaml
99
import os
10-
import sys
1110
import time
1211
import logging
1312
from argparse import ArgumentParser
@@ -66,6 +65,9 @@ def output(self):
6665
if channel is not None and output[1] is not None:
6766
if limiter:
6867
time.sleep(.1)
68+
limiter = False
69+
message = output[1].encode('ascii','ignore')
70+
channel.send_message("{}".format(message))
6971
limiter = True # TODO: check goal: no sleep for 1st channel, sleep of all after ?
7072
# TODO: find out how to safely encode stuff if needed :(
7173
# message = output[1].encode('utf-8','ignore')
@@ -89,7 +91,9 @@ def load_plugins(self):
8991
# print "error loading plugin %s" % name
9092

9193
class Plugin(object):
92-
def __init__(self, name):
94+
def __init__(self, name, plugin_config=None):
95+
if plugin_config is None:
96+
plugin_config = {} #TODO: is this necessary?
9397
self.name = name
9498
self.jobs = []
9599
self.module = __import__(name)
@@ -115,11 +119,11 @@ def do(self, function_name, data):
115119
# this makes the plugin fail with stack trace in debug mode
116120
if not debug:
117121
try:
118-
eval("self.module." + function_name)(data, bot, config)
122+
eval("self.module." + function_name)(data)
119123
except:
120124
dbg("problem in module {} {}".format(function_name, data))
121125
else:
122-
eval("self.module." + function_name)(data, bot, config)
126+
eval("self.module." + function_name)(data)
123127
if "catch_all" in dir(self.module):
124128
try:
125129
self.module.catch_all(data)

0 commit comments

Comments
 (0)