1
0
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:
2011-03-15 14:50:35 +01:00
parent 35bf60bbf0
commit 7fe43cb486
2 changed files with 10 additions and 1 deletions

View File

@@ -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

View File

@@ -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."""