1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-27 02:16:12 +01:00

- Don't try to catch rpm-python errors if rpm-python isn't installed.

Thus we can avoid a hard dependency on having rpm-python.
This commit is contained in:
Dr. Peter Poeml 2008-09-24 12:16:25 +00:00
parent cc0ce146e2
commit 77a18bd1da

View File

@ -9,8 +9,13 @@ import sys
import signal import signal
from osc import oscerr from osc import oscerr
from urllib2 import URLError, HTTPError from urllib2 import URLError, HTTPError
# import as RPMError because the class "error" is too generic try:
from rpm import error as RPMError # import as RPMError because the class "error" is too generic
from rpm import error as RPMError
except:
# if rpm-python isn't installed (we might be on a debian system):
RPMError = None
# the good things are stolen from Matt Mackall's mercurial # the good things are stolen from Matt Mackall's mercurial