From bbdde60809ee5f45c1044bef5362e34ad9bcf5f2 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Mon, 22 Jun 2009 04:09:55 +0200 Subject: [PATCH] [entropy.const/entropy.qa/equo/sulfur] make ErrorReportInterface post_url arg. mandatory In the aim of removing all the sabayon-centric settings from the "entropy" library, error report via http post url has been moved outside it. --- client/equo.py | 4 +++- libraries/entropy/const.py | 3 --- libraries/entropy/qa.py | 2 +- sulfur/src/sulfur/dialogs.py | 6 ++++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/client/equo.py b/client/equo.py index f4ceb6bac..9ccdb3da2 100644 --- a/client/equo.py +++ b/client/equo.py @@ -863,7 +863,9 @@ def main(): error = UGCErrorReportInterface( ) except (IncorrectParameter, OnlineMirrorError,): from entropy.qa import ErrorReportInterface - error = ErrorReportInterface() + post_url = "http://svn.sabayonlinux.org/entropy/standard" + \ + "/sabayonlinux.org/handlers/http_error_report.php" + error = ErrorReportInterface(post_url) error.prepare(errorText, name, email, '\n'.join([unicode(x) for x in exception_data]), description) result = error.submit() diff --git a/libraries/entropy/const.py b/libraries/entropy/const.py index 370f3055d..628559077 100644 --- a/libraries/entropy/const.py +++ b/libraries/entropy/const.py @@ -649,9 +649,6 @@ def const_default_settings(rootdir): 'handlers': { # md5sum handler, 'md5sum': "md5sum.php?arch="+etpSys['arch']+"&package=", - # XXX: hardcoded? - 'errorsend': "http://svn.sabayonlinux.org/entropy/standard" - "/sabayonlinux.org/handlers/http_error_report.php", }, } diff --git a/libraries/entropy/qa.py b/libraries/entropy/qa.py index b4a679569..8768496fe 100644 --- a/libraries/entropy/qa.py +++ b/libraries/entropy/qa.py @@ -518,7 +518,7 @@ class QAInterface: class ErrorReportInterface: import entropy.tools as entropyTools - def __init__(self, post_url = etpConst['handlers']['errorsend']): + def __init__(self, post_url): from entropy.misc import MultipartPostHandler import urllib2 self.url = post_url diff --git a/sulfur/src/sulfur/dialogs.py b/sulfur/src/sulfur/dialogs.py index eddfbb1f2..c74ace863 100644 --- a/sulfur/src/sulfur/dialogs.py +++ b/sulfur/src/sulfur/dialogs.py @@ -6366,10 +6366,12 @@ class ExceptionDialog: from entropy.client.interfaces.qa import UGCErrorReportInterface try: - error = UGCErrorReportInterface( ) + error = UGCErrorReportInterface() except (IncorrectParameter, OnlineMirrorError,): + post_url = "http://svn.sabayonlinux.org/entropy/standard" + \ + "/sabayonlinux.org/handlers/http_error_report.php" from entropy.qa import ErrorReportInterface - error = ErrorReportInterface() + error = ErrorReportInterface(post_url) error.prepare(errmsg, name, mail, description = description) result = error.submit()