src/OsecFS.py
changeset 16 0c5554941179
parent 15 0b4d2bf9d306
child 17 cd94e91c37c4
     1.1 --- a/src/OsecFS.py	Thu May 15 12:21:34 2014 +0200
     1.2 +++ b/src/OsecFS.py	Wed May 21 16:58:35 2014 +0200
     1.3 @@ -174,9 +174,9 @@
     1.4      
     1.5      try:
     1.6          response = httpPool.request_encode_body("POST", url, fields=data, retries=0)
     1.7 -    except:
     1.8 +    except Exception, e:
     1.9          LOG.error("Remote host not reachable")
    1.10 -        LOG.error ("Exception: %s" %(sys.exc_info()[0]))
    1.11 +        LOG.error ("Exception: %s" %(e,))
    1.12          return
    1.13      
    1.14      if response.status == STATUS_CODE_OK:
    1.15 @@ -198,7 +198,7 @@
    1.16      sendNotification ("critical", "Send log entry to opensecurity rest server failed.")
    1.17      
    1.18  def sendFileLog(filename, filesize, filehash, hashtype):
    1.19 -    data = {"filename" : filename, "filesize" : filesize, "filehash" : filehash, "hashtype" : hashtype}
    1.20 +    data = {"filename" : filename, "filesize" : "%s" %(filesize,), "filehash" : filehash, "hashtype" : hashtype}
    1.21      retval = sendDataToRest ("log", data)
    1.22      if (retval == False):
    1.23          sendLogNotPossibleNotification()