Commit 893dcb3b authored by Andreas Freise's avatar Andreas Freise
Browse files

fixing __new__ error and one string error with Python 3"

parent 35db2cb1
......@@ -99,7 +99,7 @@ class Component(object):
cnew = type(cnew_name, (cls,), {})
return object.__new__(cnew, *args, **kwargs)
return object.__new__(cnew)
def __init__(self, name=None):
......
......@@ -51,7 +51,7 @@ class BaseDetector(object) :
cnew = type(cnew_name, (cls,), {})
return object.__new__(cnew, *args, **kwargs)
return object.__new__(cnew)
def __init__(self, name, nodes=None, max_nodes=1):
......@@ -394,7 +394,7 @@ class pd(Detector1):
cnew = type(cnew_name, (cls,), {})
return object.__new__(cnew, *args, **kwargs)
return object.__new__(cnew)
def __deepcopy__(self, memo):
"""
......
......@@ -433,8 +433,8 @@ class kat(object):
global id___
id___ += 1
cnew = type(pykat.finesse.kat.__name__ + str("_") + str(id___), (pykat.finesse.kat,), {})
return object.__new__(cnew, *args, **kwargs)
return object.__new__(cnew)
def __init__(self, kat_file=None, kat_code=None, katdir="", katname="", tempdir=None, tempname=None):
self.scene = None # scene object for GUI
self.verbose = True
......@@ -1119,7 +1119,7 @@ class kat(object):
[out,errpipe] = p.communicate()
_out = out.split("\n")
_out = str(out).split("\n")
for line in _out[::-1]:
if line.lstrip().startswith('computation time:'):
......
......@@ -36,7 +36,8 @@ class NodeNetwork(object):
cnew = type(cnew_name, (cls,), {})
return object.__new__(cnew, *args, **kwargs)
#return object.__new__(cnew, *args, **kwargs)
return object.__new__(cnew)
def __init__(self, kat):
self.__nodes = {}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment