bloodhound-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anze Staric <>
Subject ProductEnvironment constructor
Date Fri, 27 Sep 2013 08:30:34 GMT
Is there anything wrong with replacing

         if not isinstance(env, trac.env.Environment):
              raise TypeError("Initializer must be called with " ...


        env = env.parent or env

in ProductEnvironment constructor? The assertion is there to prevent
nesting of ProductEnvironments, but this is still achieved with the
bottom version. Extracting global env when product env is passed would
simplify a lot of places in code where a check is needed before
instantiating ProductEnvironment. It would also pass all the failing
wiki syntax tests.


View raw message