Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions pyobs/comm/xmpp/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,17 @@ async def _on_jabber_rpc_method_fault(self, iq: Any) -> None:

# get exception and error
s: str = fault["string"]
print(s)
exception_name = s[1 : s.index(">")]
exception_message = s[s.index(">") + 1 :].strip()

# get class of exception
exception_class = getattr(exc, exception_name)
if ">" in s:
# a pyobs exception
exception_name = s[1 : s.index(">")]
exception_message = s[s.index(">") + 1 :].strip()
exception_class = getattr(exc, exception_name)

else:
# some generic error, wrap it into a remote error
exception_class = exc.RemoteError
exception_message = s

# and instantiate it
if issubclass(exception_class, exc.RemoteError):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "pyobs-core"
version = "1.35.4"
version = "1.35.5"
description = "robotic telescope software"
authors = [{ name = "Tim-Oliver Husser", email = "thusser@uni-goettingen.de" }]
requires-python = ">=3.11"
Expand Down
8 changes: 4 additions & 4 deletions tests/images/processors/exptime/test_exptime.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
from pyobs.images import Image


class TestExpTimeEstimator(ExpTimeEstimator):
class ExpTimeEstimatorTest(ExpTimeEstimator):
async def _calc_exp_time(self, image: Image) -> float:
pass


@pytest.mark.asyncio
async def test_call(mocker):
estimator = TestExpTimeEstimator(5.0, 10.0)
estimator = ExpTimeEstimatorTest(5.0, 10.0)
image = Image()

mocker.patch.object(estimator, "_calc_exp_time", return_value=1.0)
Expand All @@ -27,7 +27,7 @@ def test_set_exp_time_lower(mocker):
image = Image()
mocker.patch.object(image, "set_meta")

estimator = TestExpTimeEstimator(5.0, 10.0)
estimator = ExpTimeEstimatorTest(5.0, 10.0)

estimator._set_exp_time(image, 0.0)

Expand All @@ -39,7 +39,7 @@ def test_set_exp_time_upper(mocker):
image = Image()
mocker.patch.object(image, "set_meta")

estimator = TestExpTimeEstimator(5.0, 10.0)
estimator = ExpTimeEstimatorTest(5.0, 10.0)

estimator._set_exp_time(image, 15.0)

Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.