Selaa lähdekoodia

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 10 vuotta sitten
vanhempi
sitoutus
c51d53afba
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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