From 99ac07fd4690a9f024a560e943106a989cf6d4ae Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Mon, 28 May 2018 21:41:16 -0400 Subject: if GradingSchemeTable cannot be created do not spam in the html output or log --- GradeBook_lib.tcl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl index 6565a5b..11280ee 100755 --- a/GradeBook_lib.tcl +++ b/GradeBook_lib.tcl @@ -66,9 +66,13 @@ proc get_default_grading_scheme {} { proc CreateGradingSchemeTable {db} { begin_db_transaction set err [catch {db eval {CREATE TABLE GradingSchemeTable(LetterGrade text, LowerCutoff real)} } errStat] - if { $err } { - htmlErrorMsg $errStat - dbg "Could not create GradingSchemeTable: $errStat" msg_level_critical [lindex [info level 0] 0] + if { $err} { + if { $errStat ne "attempt to write a readonly database" } { + htmlErrorMsg $errStat + dbg "Could not create GradingSchemeTable: $errStat" msg_level_critical [lindex [info level 0] 0] + } else { + dbg "Could not create GradingSchemeTable: $errStat" msg_level_info [lindex [info level 0] 0] + } end_db_transaction; return } foreach {letter cutoff} [get_default_grading_scheme] { -- cgit v1.2.3