summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2017-01-12 00:00:00 -0800
committerSteve Manuel <nilslice@gmail.com>2017-01-12 00:00:00 -0800
commit0b084a9e94d16ed71ab05efa4596473ed6e256d8 (patch)
treee1c166b30d26b67a38ff8dcb4f4165e196c79eea
parent9a982d8ab53203577f8ec1ce4d0ab51dffac16fa (diff)
handling error
-rw-r--r--system/db/content.go2
-rw-r--r--system/db/init.go3
-rw-r--r--system/init/init.go6
3 files changed, 1 insertions, 10 deletions
diff --git a/system/db/content.go b/system/db/content.go
index f4671de..5ddf0a7 100644
--- a/system/db/content.go
+++ b/system/db/content.go
@@ -436,7 +436,7 @@ func SortContent(namespace string) {
err := store.Update(func(tx *bolt.Tx) error {
bname := []byte(namespace + "__sorted")
err := tx.DeleteBucket(bname)
- if err != nil {
+ if err != nil || err != bolt.ErrBucketNotFound {
return err
}
diff --git a/system/db/init.go b/system/db/init.go
index 49329d3..eaf6d76 100644
--- a/system/db/init.go
+++ b/system/db/init.go
@@ -9,9 +9,6 @@ import (
"github.com/boltdb/bolt"
"github.com/nilslice/jwt"
-
- // initialize the system with db configuration
- _ "github.com/ponzu-cms/ponzu/system/init"
)
var store *bolt.DB
diff --git a/system/init/init.go b/system/init/init.go
deleted file mode 100644
index ed4d8ef..0000000
--- a/system/init/init.go
+++ /dev/null
@@ -1,6 +0,0 @@
-package init
-
-import (
- // content package must be initialized so our db is pre-configured
- _ "github.com/ponzu-cms/ponzu/content"
-)