(self, number, access)
Attempt to access a file.
Attempt to access a file.
Attempt to access a file .
def try_access(self, number, access):
        """Attempt to access a file."""
        if not number:
            return
        this_file = self._locking_parameters[number]
        # access in violation of ACCESS declaration in OPEN: path/file access error
        if this_file.access and not (set(access) & set(this_file.access)):
            raise error.BASICError(error.PATH_FILE_ACCESS_ERROR)
        # access in violation of other's LOCK declation in OPEN: path/file access error
        others = self.list_open(this_file.name, number)
        for f in others:
            if (f.lock_type and f.lock_type != b'SHARED' and (set(f.lock_type) & set(access))):
                raise error.BASICError(error.PATH_FILE_ACCESS_ERROR)
def try_access ( self , number , access ) : if not number : return this_file = self . _locking_parameters [ number ] # access in violation of ACCESS declaration in OPEN: path/file access error if this_file . access and not ( set ( access ) & set ( this_file . access ) ) : raise error . BASICError ( error . PATH_FILE_ACCESS_ERROR ) # access in violation of other's LOCK declation in OPEN: path/file access error others = self . list_open ( this_file . name , number ) for f in others : if ( f . lock_type and f . lock_type != b'SHARED' and ( set ( f . lock_type ) & set ( access ) ) ) : raise error . BASICError ( error . PATH_FILE_ACCESS_ERROR )