1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-09-05 20:58:42 +02:00

parseRevisionOption(): Raise an exception on invalid revisions

This commit is contained in:
2022-04-04 10:54:59 +02:00
parent 5d6cfe80d5
commit ca9dc30643
3 changed files with 74 additions and 3 deletions

View File

@@ -121,6 +121,22 @@ class OscIOError(OscBaseError):
self.e = e
self.msg = msg
class OscValueError(OscBaseError):
"""
Invalid argument value (of correct type).
"""
pass
class OscInvalidRevision(OscValueError):
"""
Invalid revision value.
"""
def __str__(self):
return "Invalid revision value: {}".format("".join(self.args))
class PackageNotInstalled(OscBaseError):
"""
Exception raised when a package is not installed on local system