mirror of
https://github.com/openSUSE/osc.git
synced 2025-09-06 13:18:42 +02:00
- missing source serivce on local workstation is not an API error
This commit is contained in:
@@ -328,7 +328,7 @@ class Serviceinfo:
|
||||
if not os.path.exists("/usr/lib/obs/service/"+name):
|
||||
msg = "ERROR: service is not installed!\n"
|
||||
msg += "Maybe try this: zypper in obs-service-" + name
|
||||
raise oscerr.APIError(msg)
|
||||
raise oscerr.PackageNotInstalled(msg)
|
||||
c = "/usr/lib/obs/service/" + call + " --outdir " + temp_dir
|
||||
if conf.config['verbose'] > 1:
|
||||
print "Run source service:", c
|
||||
|
@@ -101,6 +101,15 @@ class OscIOError(OscBaseError):
|
||||
self.e = e
|
||||
self.msg = msg
|
||||
|
||||
class PackageNotInstalled(OscBaseError):
|
||||
"""
|
||||
Exception raised when a package is not installed on local system
|
||||
"""
|
||||
def __init__(self, e, msg):
|
||||
OscBaseError.__init__(self)
|
||||
self.e = e
|
||||
self.msg = msg
|
||||
|
||||
class SignalInterrupt(Exception):
|
||||
"""Exception raised on SIGTERM and SIGHUP."""
|
||||
|
||||
|
Reference in New Issue
Block a user