Explorar el Código

Fix off by one error

In our circular reference check the stack was previously off by one,
by not including the current service name that was calling another.

Signed-off-by: Mazz Mosley <[email protected]>
Mazz Mosley hace 10 años
padre
commit
c51d53afba
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      compose/config.py

+ 1 - 1
compose/config.py

@@ -149,7 +149,7 @@ class ServiceLoader(object):
 
     def make_service_dict(self, name, service_dict):
         if self.signature(name) in self.already_seen:
-            raise CircularReference(self.already_seen)
+            raise CircularReference(self.already_seen + [self.signature(name)])
 
         service_dict = service_dict.copy()
         service_dict['name'] = name