Skip to content

Commit

Permalink
MNT #316 error for databroker v2 now
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed Dec 23, 2023
1 parent aa1e0c5 commit 6a4ceaa
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions hkl/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
.. [#] https://physics.nist.gov/cgi-bin/cuu/Value?asil
"""

from __future__ import print_function

import logging
import subprocess
import sys
Expand Down Expand Up @@ -341,6 +339,14 @@ def run_orientation_info(run):
run : from Databroker
A Bluesky run, from databroker v2, such as ``cat.v2[-1]``.
"""
import databroker

if databroker.__version__ >= "2.0":
raise ValueError(
f"This function does not work with databroker {databroker.__version__}."
" See https://github.com/bluesky/hklpy/pull/317 for details."
)

devices = {}
try:
run_conf = run.primary.config
Expand Down

0 comments on commit 6a4ceaa

Please sign in to comment.