(obj)
We only care about the compressed flash files
We only care about the compressed flash files
We only care about the compressed flash files
def valid_for(obj):
        if obj.filedata.grid_id == None:
            raise ServiceConfigError("Missing filedata.")
        data = obj.filedata.read(4)
        if len(data) < 4:
            raise ServiceConfigError("Need at least 4 bytes.")
        # Reset the read pointer.
        obj.filedata.seek(0)
        'We only care about the compressed flash files'
        if not data[:3] in ['CWS','ZWS']:
            raise ServiceConfigError("Not a valid compressed Flash file.")
def valid_for ( obj ) : if obj . filedata . grid_id == None : raise ServiceConfigError ( "Missing filedata." ) data = obj . filedata . read ( 4 ) if len ( data ) < 4 : raise ServiceConfigError ( "Need at least 4 bytes." ) # Reset the read pointer. obj . filedata . seek ( 0 ) if not data [ : 3 ] in [ 'CWS' , 'ZWS' ] : raise ServiceConfigError ( "Not a valid compressed Flash file." )