Franck Pommereau

fixes from Carlos Galindo

......@@ -16,10 +16,10 @@ for name, cls in inspect.getmembers(_ast, inspect.isclass) :
class _Ast (cls, AST) :
def __init__ (self, *larg, **karg) :
if len(larg) > 0 and len(larg) != len(self._fields) :
raise TypeError, ("%s constructor takes either 0 or "
"%u positional arguments"
% (self.__class__.__name__,
len(self._fields)))
raise TypeError("%s constructor takes either 0 or "
"%u positional arguments"
% (self.__class__.__name__,
len(self._fields)))
for name, arg in zip(self._fields, larg) + karg.items() :
if name in self._fields :
setattr(self, name, arg)
......
......@@ -16,7 +16,10 @@ except :
try :
import BaseHTTPServer
except :
import http as BaseHTTPServer
try :
import http.server as BaseHTTPServer
except :
import http as BaseHTTPServer
##
##
......
......@@ -133,8 +133,8 @@ class TerminalController:
# For any modern terminal, we should be able to just ignore
# these, so strip them out.
import curses
cap = curses.tigetstr(cap_name) or ''
return re.sub(r'\$<\d+>[/*]?', '', cap)
cap = curses.tigetstr(cap_name) or b''
return re.sub(rb'\$<\d+>[/*]?', b'', cap)
def render(self, template):
"""
......