Hadron / carthage

Carthage is an Infrastructure as Code (IAC) framework
Other
8 stars 4 forks source link

error when container propagation with no outer key #3

Closed hartmans closed 2 years ago

hartmans commented 3 years ago

Say you have a machine in a network without a constraint on the outer key of the network. You get an error like this:

    from .networks import demo_network, nfs_network
  File "/root/project/carthage/carthage/modeling/implementation.py", line 158, in __setitem__
    if f(self.cls, self, k, state):
  File "/root/project/carthage/carthage/modeling/implementation.py", line 451, in _integrate_containment
    propagate_provider(k, v, options)
  File "/root/project/carthage/carthage/modeling/implementation.py", line 403, in propagate_provider
    outer_constraints = outer_key.constraints
NameError: free variable 'outer_key' referenced before assignment in enclosing scope
hartmans commented 2 years ago

@kdienes FYI, this is the issue you were showing me this morning. Apparently there was already a bug open.