mirror of
https://github.com/planetmint/planetmint.git
synced 2025-11-25 15:05:49 +00:00
Mest commit
rge branch 'fixed_config' of github.com:liviu-lesan/planetmint into fixed_config
This commit is contained in:
commit
828d2202a6
@ -4,6 +4,7 @@
|
|||||||
# Code is Apache-2.0 and docs are CC-BY-4.0
|
# Code is Apache-2.0 and docs are CC-BY-4.0
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
from jsonschema import SchemaError
|
||||||
import tarantool
|
import tarantool
|
||||||
|
|
||||||
from planetmint.config import Config
|
from planetmint.config import Config
|
||||||
@ -31,7 +32,10 @@ class TarantoolDB:
|
|||||||
"transactions", "inputs", "outputs", "keys"]
|
"transactions", "inputs", "outputs", "keys"]
|
||||||
|
|
||||||
def space(self, space_name: str):
|
def space(self, space_name: str):
|
||||||
return self.db_connect.space(space_name)
|
try:
|
||||||
|
return self.db_connect.space(space_name)
|
||||||
|
except tarantool.error.SchemaError:
|
||||||
|
return None
|
||||||
|
|
||||||
def get_connection(self):
|
def get_connection(self):
|
||||||
return self.db_connect
|
return self.db_connect
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user