camtool/dbinit: fix error printing

Change-Id: I749eae0207f5aa96bb342cf961d8511344acc26c
This commit is contained in:
mpl 2014-08-08 17:24:48 +02:00
parent 975e251c36
commit 98d967ce39
1 changed files with 3 additions and 3 deletions

View File

@ -188,7 +188,7 @@ func (c *dbinitCmd) RunCommand(args []string) error {
func do(db *sql.DB, sql string) {
_, err := db.Exec(sql)
if err != nil {
exitf("Error %v running SQL: %s", err, sql)
exitf("Error %q running SQL: %q", err, sql)
}
}
@ -198,7 +198,7 @@ func doQuery(db *sql.DB, sql string) {
r.Close()
return
}
exitf("Error %v running SQL: %s", err, sql)
exitf("Error %q running SQL: %q", err, sql)
}
func (c *dbinitCmd) dbExists(db *sql.DB) bool {
@ -249,7 +249,7 @@ func exitf(format string, args ...interface{}) {
if !strings.HasSuffix(format, "\n") {
format = format + "\n"
}
cmdmain.Errorf(format, args)
cmdmain.Errorf(format, args...)
cmdmain.Exit(1)
}