1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-09-06 21:28:42 +02: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
from osc import oscerr
from urllib2 import URLError, HTTPError
# import as RPMError because the class "error" is too generic
from rpm import error as RPMError
try:
# 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