summaryrefslogtreecommitdiff
path: root/libpod/in_memory_state.go
diff options
context:
space:
mode:
authorMatthew Heon <mheon@redhat.com>2018-12-02 14:21:22 -0500
committerMatthew Heon <mheon@redhat.com>2018-12-02 14:21:22 -0500
commit92ff83f5b9dd00ff91dc8c3d6b48f1e0b5c5f3e2 (patch)
treee87c5909794f1b64c85b88420cb1d6d2a322edc9 /libpod/in_memory_state.go
parentaa7ce33b7a7698d220f258bf9b29068be6fdb531 (diff)
downloadpodman-92ff83f5b9dd00ff91dc8c3d6b48f1e0b5c5f3e2.tar.gz
podman-92ff83f5b9dd00ff91dc8c3d6b48f1e0b5c5f3e2.tar.bz2
podman-92ff83f5b9dd00ff91dc8c3d6b48f1e0b5c5f3e2.zip
Set default paths from DB if not explicitly overridden
If the DB contains default paths, and the user has not explicitly overridden them, use the paths in the DB over our own defaults. The DB validates these paths, so it would error and prevent operation if they did not match. As such, instead of erroring, we can use the DB's paths instead of our own. Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'libpod/in_memory_state.go')
-rw-r--r--libpod/in_memory_state.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/libpod/in_memory_state.go b/libpod/in_memory_state.go
index 8cd2f47b9..77eba0cc6 100644
--- a/libpod/in_memory_state.go
+++ b/libpod/in_memory_state.go
@@ -73,9 +73,10 @@ func (s *InMemoryState) Refresh() error {
return nil
}
-// GetDBConfig is not implemented for the in-memory state
+// GetDBConfig is not implemented for in-memory state.
+// As we do not store a config, return an empty one.
func (s *InMemoryState) GetDBConfig() (*DBConfig, error) {
- return nil, ErrNotImplemented
+ return &DBConfig{}, nil
}
// ValidateDBConfig is not implemented for the in-memory state.