fix(miniooni): handle panics with --repeat-every (#914)
Most of miniooni panics on errors. We should not panic on error with --repeat-every, rather we should try the next measurement. See https://github.com/ooni/probe/issues/2250
This commit is contained in:
parent
0bc6aae601
commit
a8a29cc0dd
2 changed files with 17 additions and 1 deletions
|
|
@ -17,7 +17,10 @@ func acquireUserConsent(miniooniDir string, currentOptions *Options) {
|
|||
consentFile := path.Join(miniooniDir, "informed")
|
||||
err := maybeWriteConsentFile(currentOptions.Yes, consentFile)
|
||||
runtimex.PanicOnError(err, "cannot write informed consent file")
|
||||
runtimex.PanicIfFalse(regularFileExists(consentFile), riskOfRunningOONI)
|
||||
runtimex.PanicIfFalse(
|
||||
regularFileExists(consentFile),
|
||||
riskOfRunningOONI,
|
||||
)
|
||||
}
|
||||
|
||||
// maybeWriteConsentFile writes the consent file iff the yes argument is true
|
||||
|
|
@ -30,6 +33,7 @@ func maybeWriteConsentFile(yes bool, filepath string) (err error) {
|
|||
|
||||
// riskOfRunningOONI is miniooni's informed consent text.
|
||||
const riskOfRunningOONI = `
|
||||
|
||||
Do you consent to OONI Probe data collection?
|
||||
|
||||
OONI Probe collects evidence of internet censorship and measures
|
||||
|
|
|
|||
Loading…
Reference in a new issue