Ignore:
Timestamp:
08/15/13 12:31:48 (11 years ago)
Author:
sanmai
Message:
  • Fix JSON validity check.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • monitoring/plugins/mpi/generic_tla_monitoring.py

    r3381 r3382  
    6666                  mode = "wt") as debugging_output_file :
    6767            debugging_output_file.write(traceback_string)
    68         sys.exit(999) # X- exit with some special error status
     68        #sys.exit(999) # X- exit with some special error status
    6969   
    7070    return valid
     
    103103                          descriptive_string,
    104104                          kwargs) :
    105         json.loads(data)
     105
     106        try :
     107            json.loads(data)
     108        except JSONDecodeError :
     109            valid = False
     110        else :
     111            valid = True
     112
     113        return valid
    106114
    107115    wellformedness = generic_validator(data,
     
    154162                                       kwargs,
    155163                                       special_validator)
    156     return (wellformedness)
     164    return wellformedness
    157165
    158166
Note: See TracChangeset for help on using the changeset viewer.