def list_leases(self, uuid=None):
try:<EOL><INDENT>lease_files = os.listdir(self.path)<EOL><DEDENT>except OSError as e:<EOL><INDENT>raise_from(<EOL>LagoSubnetLeaseBadPermissionsException(self.path, e.strerror),<EOL>e<EOL>)<EOL><DEDENT>leases = [<EOL>self.create_lease_object_from_idx(lease_file.split('<STR_LIT:.>')[<NUM_LIT:0>])<EOL>for lease_file in lease_files if lease_file != LOCK_NAME<EOL>]<EOL>if not uuid:<EOL><INDENT>return leases<EOL><DEDENT>else:<EOL><INDENT>return [lease for lease in leases if lease.uuid == uuid]<EOL><DEDENT>
List current subnet leases

Args:
    uuid(str): Filter the leases by uuid

Returns:
    list of :class:~Lease: current leases