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.
pull/158/head
cclauss 2018-04-26 00:43:49 -06:00 committed by GitHub
parent a70a8f3a04
commit 2b4cb04976
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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