Gordon Messmer a écrit :
Jérôme Blion wrote:
def doFilter(bodyFile, controlFileList):
    # check for viruses
    try:
        pyclamd.init_unix_socket('/tmp/clamd')
        avresult = pyclamd.contscan_file(bodyFile)

    except Exception, e:
        return "554 " + str(e)

    if str(avresult) == 'None':
        return ''

You don't need to convert avresult to a string.  Just do a comparison:

  if avresult == None:
    return ''
Indeed...
I updated my version... I let you update the one I provided to the mailing list if you want to include it...

Jerome Blion.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to