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:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user