1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 06:46:15 +01:00

- renamed "PackageNotInstalled" exception to "ServiceNotInstalled"

- also catch this exception in babysitter.py
This commit is contained in:
Marcus Huewe 2011-03-30 01:10:48 +02:00
parent 8ab7ab3caa
commit be4f1f350e
3 changed files with 8 additions and 5 deletions

View File

@ -158,6 +158,10 @@ def run(prg):
print >>sys.stderr, e.msg
return 1
except oscerr.ServiceNotInstalled, e:
print >>sys.stderr, e.msg
return 1
except oscerr.WorkingCopyOutdated, e:
print >>sys.stderr, e
return 1

View File

@ -330,7 +330,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.PackageNotInstalled(msg)
raise oscerr.ServiceNotInstalled(msg)
c = "/usr/lib/obs/service/" + call + " --outdir " + temp_dir
if conf.config['verbose'] > 1:
print "Run source service:", c

View File

@ -101,13 +101,12 @@ class OscIOError(OscBaseError):
self.e = e
self.msg = msg
class PackageNotInstalled(OscBaseError):
class ServiceNotInstalled(OscBaseError):
"""
Exception raised when a package is not installed on local system
Exception raised when a service is not installed on local system
"""
def __init__(self, e, msg):
def __init__(self, msg):
OscBaseError.__init__(self)
self.e = e
self.msg = msg
class SignalInterrupt(Exception):