[entropy.client.interfaces.qa] make UGCErrorReportInterface repository_id constructor argument mandatory
This commit is contained in:
+3
-1
@@ -960,7 +960,9 @@ def handle_exception(exc_class, exc_instance, exc_tb):
|
||||
|
||||
try:
|
||||
from entropy.client.interfaces.qa import UGCErrorReportInterface
|
||||
error = UGCErrorReportInterface()
|
||||
from entropy.core.settings.base import SystemSettings
|
||||
repository_id = SystemSettings()['repositories']['default_repository']
|
||||
error = UGCErrorReportInterface(repository_id)
|
||||
except (OnlineMirrorError, AttributeError, ImportError,):
|
||||
error = None
|
||||
|
||||
|
||||
@@ -36,20 +36,17 @@ class UGCErrorReportInterface(ErrorReportInterface):
|
||||
print("cannot report error")
|
||||
"""
|
||||
|
||||
def __init__(self, repository_id = None):
|
||||
def __init__(self, repository_id):
|
||||
"""
|
||||
object constructor, repository_id must be a valid repository
|
||||
identifier.
|
||||
|
||||
@param repository_id -- valid repository identifier
|
||||
@type basestring
|
||||
@param repository_id: valid repository identifier
|
||||
@type repository_id: string
|
||||
"""
|
||||
ErrorReportInterface.__init__(self, '#fake#')
|
||||
self.__system_settings = SystemSettings()
|
||||
|
||||
if repository_id == None:
|
||||
repository_id = etpConst['officialrepositoryid']
|
||||
|
||||
self.entropy = Client()
|
||||
self.__repository_id = repository_id
|
||||
if self.entropy.UGC == None:
|
||||
|
||||
@@ -3339,8 +3339,10 @@ class ExceptionDialog:
|
||||
if rc == -1:
|
||||
|
||||
from entropy.client.interfaces.qa import UGCErrorReportInterface
|
||||
from entropy.core.settings.base import SystemSettings
|
||||
repository_id = SystemSettings()['repositories']['default_repository']
|
||||
try:
|
||||
error = UGCErrorReportInterface()
|
||||
error = UGCErrorReportInterface(repository_id)
|
||||
except (AttributeError, OnlineMirrorError,):
|
||||
error = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user