Commit 715ea1c7 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update factory and inspirehepstore to add the constant SHELFS

parent 40d8704e
...@@ -17,7 +17,7 @@ from .base import (CDS, ...@@ -17,7 +17,7 @@ from .base import (CDS,
from datetime import datetime from datetime import datetime
from .exception import CdsException from .exception import CdsException
from .inveniostore import InvenioStore from .inveniostore import InvenioStore
from .inspirehepstore import InspirehepStore from .inspirehepstore import InspirehepStore, SHELFS
from .recordconf import RecordConf from .recordconf import RecordConf
from .recordinst import RecordInst from .recordinst import RecordInst
from .recordpubli import RecordPubli from .recordpubli import RecordPubli
...@@ -258,7 +258,7 @@ def build_store(host=None, shelf=None): ...@@ -258,7 +258,7 @@ def build_store(host=None, shelf=None):
elif host in INS and shelf is None: elif host in INS and shelf is None:
store = InvenioStore(host="old.inspirehep.net") store = InvenioStore(host="old.inspirehep.net")
elif host in INS: elif host in INS and shelf in SHELFS:
store = InspirehepStore(host=host, shelf=shelf) store = InspirehepStore(host=host, shelf=shelf)
else: else:
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
from .basestore import BaseStore, MSG_HTTP_DECODE, MSG_INVALID_RESPONSE from .basestore import BaseStore, MSG_HTTP_DECODE, MSG_INVALID_RESPONSE
from .exception import CdsException from .exception import CdsException
SHELFS = ("literature", "conferences", "institutions")
class InspirehepStore(BaseStore): class InspirehepStore(BaseStore):
""" Interface to the inspirehep store release v2. """ Interface to the inspirehep store release v2.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment