Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:redwil:15.4
supybot-notify
python3.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File python3.patch of Package supybot-notify
Index: supybot-notify-0.2.2/__init__.py =================================================================== --- supybot-notify-0.2.2.orig/__init__.py +++ supybot-notify-0.2.2/__init__.py @@ -50,14 +50,16 @@ __contributors__ = {supybot.Author('Tim # This is a url where the most recent plugin package can be downloaded. __url__ = 'https://fedorahosted.org/released/supybot-notify/' -import config -import plugin -reload(plugin) # In case we're being reloaded. +from . import config +from . import plugin + +import importlib +importlib.reload(plugin) # In case we're being reloaded. # Add more reloads here if you add third-party modules and want them to be # reloaded when this plugin is reloaded. Don't forget to import them as well! if world.testing: - import test + from . import test Class = plugin.Class configure = config.configure Index: supybot-notify-0.2.2/plugin.py =================================================================== --- supybot-notify-0.2.2.orig/plugin.py +++ supybot-notify-0.2.2/plugin.py @@ -35,10 +35,10 @@ import supybot.callbacks as callbacks import supybot.world as world import supybot.ircmsgs as ircmsgs import threading -import SocketServer +import socketserver import select -class NotifyServerHandler(SocketServer.StreamRequestHandler): +class NotifyServerHandler(socketserver.StreamRequestHandler): def handle(self): try: while True: @@ -46,7 +46,9 @@ class NotifyServerHandler(SocketServer.S if not line: break line = line.strip() - (channel, text) = line.split(' ', 1) + (channel, text) = line.split(b' ', 1) + channel = channel.decode() + text = text.decode() if not channel or not text: continue if self.server.channel_states.get(channel, "on") == "on": @@ -61,12 +63,12 @@ class NotifyServerHandler(SocketServer.S """In the future there should be specific exception handlers here. Until then we'll just print out the base one.""" - print e + print(e) -class StoppableThreadingTCPServer(SocketServer.ThreadingTCPServer): +class StoppableThreadingTCPServer(socketserver.ThreadingTCPServer): '''ThreadingTCPServer with shutdown capability copied from Python SVN''' def __init__(self, server_address, RequestHandlerClass): - SocketServer.ThreadingTCPServer.__init__(self, server_address, RequestHandlerClass) + socketserver.ThreadingTCPServer.__init__(self, server_address, RequestHandlerClass) self.__is_shut_down = threading.Event() self.__serving = False
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor