Py3 fixes
This commit is contained in:
+2
-2
@@ -110,7 +110,7 @@ class Event(object):
|
||||
self.memoize = {}
|
||||
|
||||
def hash(self, handler):
|
||||
return hashlib.md5(str(handler)).hexdigest()
|
||||
return hashlib.md5(repr(handler).encode('utf-8')).hexdigest()
|
||||
|
||||
def handle(self, handler, priority = 0):
|
||||
""" Registers a handler. The handler can be transmitted together
|
||||
@@ -162,7 +162,7 @@ class Event(object):
|
||||
t.daemon = True
|
||||
t.start()
|
||||
|
||||
handler_keys = self.handlers.keys()
|
||||
handler_keys = list(self.handlers.keys())
|
||||
handler_keys.sort(key = natsortKey)
|
||||
|
||||
for handler in handler_keys:
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
# `cssmin.py` - A Python port of the YUI CSS compressor.
|
||||
|
||||
|
||||
from StringIO import StringIO # The pure-Python StringIO supports unicode.
|
||||
import re
|
||||
|
||||
|
||||
@@ -52,7 +51,7 @@ def remove_unnecessary_whitespace(css):
|
||||
|
||||
"""
|
||||
Prevents 'p :link' from becoming 'p:link'.
|
||||
|
||||
|
||||
Translates 'p :link' into 'p ___PSEUDOCLASSCOLON___link'; this is
|
||||
translated back again later.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user