mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-12 08:56:13 +01:00
Add oscerr.ProjectError class needed by core.delete_project()
This commit is contained in:
parent
7f885ac6b2
commit
da029941bc
@ -126,6 +126,21 @@ class WorkingCopyOutdated(OscBaseError):
|
||||
% (self.args[0], self.args[1], self.args[2]))
|
||||
|
||||
|
||||
class ProjectError(OscBaseError):
|
||||
"""Base class for all Project related exceptions"""
|
||||
|
||||
def __init__(self, prj, msg=None):
|
||||
super().__init__()
|
||||
self.prj = prj
|
||||
self.msg = msg
|
||||
|
||||
def __str__(self):
|
||||
result = f"{self.__class__.__name__}: {self.prj}"
|
||||
if self.msg:
|
||||
result += f": {self.msg}"
|
||||
return result
|
||||
|
||||
|
||||
class PackageError(OscBaseError):
|
||||
"""Base class for all Package related exceptions"""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user