Skip to content

Commit

Permalink
ENH: Better way to detect Databroker V2
Browse files Browse the repository at this point in the history
  • Loading branch information
dmgav committed Feb 2, 2024
1 parent 9097a74 commit 1549bf4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pyxrf/model/catalog_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ def set_name(self, name):


def get_catalog(catalog_name):
from packaging import version
import databroker
if version.parse(databroker.__version__).major == 1:
raise ValueError("Non-tiled version of Databroker is installed")

from tiled.client import from_uri

c = from_uri("https://tiled.nsls2.bnl.gov")
Expand Down

0 comments on commit 1549bf4

Please sign in to comment.