Skip to content

Commit

Permalink
make RoseStemVersionException print the correct missing variable
Browse files Browse the repository at this point in the history
  • Loading branch information
wxtim committed Aug 24, 2023
1 parent 6442245 commit 872f566
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cylc/rose/stem.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,17 @@ def __repr__(self):
__str__ = __repr__


class RoseStemVersionException(Exception):
class RoseStemVersionException(CylcError):

"""Exception class when running the wrong rose-stem version."""

def __init__(self, version):

Exception.__init__(self, version)
if version is None:
self.suite_version = (
"does not have ROSE_VERSION set in the rose-suite.conf"
"does not have ROSE_STEM_VERSION set in the "
"rose-suite.conf"
)
else:
self.suite_version = "at version %s" % (version)
Expand All @@ -165,7 +167,7 @@ def __repr__(self):
__str__ = __repr__


class RoseSuiteConfNotFoundException(Exception):
class RoseSuiteConfNotFoundException(CylcError):

"""Exception class when unable to find rose-suite.conf."""

Expand Down

0 comments on commit 872f566

Please sign in to comment.