Don’t forget self in ParkingLot levels

__levels__ is an _undefined name in this context (see #93) so replace it with __self.levels__ which is defined a few lines above.
This commit is contained in:
cclauss
2018-04-26 00:43:49 -06:00
committed by GitHub
parent a70a8f3a04
commit 2b4cb04976

View File

@@ -64,7 +64,7 @@ class ParkingLot(object):
self.levels = [] # List of Levels
def park_vehicle(self, vehicle):
for level in levels:
for level in self.levels:
if level.park_vehicle(vehicle):
return True
return False