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:
parent
cc0ce146e2
commit
77a18bd1da
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user