Changes based on feedback from @bassosimone
This commit is contained in:
parent
4711a76c11
commit
52332c0977
|
@ -55,14 +55,14 @@ func GetMeasurementJSON(sess sqlbuilder.Database, measurementID int64) (map[stri
|
|||
log.Errorf("failed to run query %s: %v", req.String(), err)
|
||||
return nil, err
|
||||
}
|
||||
// MeasurementFilePath might be NULL because the measurement from a
|
||||
// 3.0.0-beta install
|
||||
if measurement.Measurement.MeasurementFilePath.Valid == false {
|
||||
log.Error("invalid measurement_file_path")
|
||||
log.Error("backup your OONI_HOME and run `ooniprobe reset`")
|
||||
return nil, errors.New("cannot access measurement file")
|
||||
}
|
||||
measurementFilePath := measurement.Measurement.MeasurementFilePath.String
|
||||
// TODO handle the case in which we have MeasurementFilePath == NULL because
|
||||
// it's a beta measurement
|
||||
b, err := ioutil.ReadFile(measurementFilePath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in New Issue
Block a user