fix easyfix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Our easyfix page is broken. First because it's trying to query
fedorahosted.org still, and for some reason it's not answering. Secondly
because it's calling the python-bugzilla connection thing wrong.

+1s to apply the below and run the sundries playbook?

kevin
--

From 867053377fff59305c7f0189a6a7079a01161b29 Mon Sep 17 00:00:00 2001
From: Kevin Fenzi <kevin@xxxxxxxxx>
Date: Thu, 25 May 2017 22:43:16 +0000
Subject: [PATCH] fix easyfix

Signed-off-by: Kevin Fenzi <kevin@xxxxxxxxx>
---
 roles/easyfix/gather/files/template.html         |  2 +-
 roles/easyfix/gather/templates/gather_easyfix.py | 39 +-----------------------
 2 files changed, 2 insertions(+), 39 deletions(-)

diff --git a/roles/easyfix/gather/files/template.html b/roles/easyfix/gather/files/template.html
index 3e1ab6f..3efdf26 100644
--- a/roles/easyfix/gather/files/template.html
+++ b/roles/easyfix/gather/files/template.html
@@ -113,7 +113,7 @@
                 </div>
                 <div id="tabs">
                     <ul>
-                        <li><a href="#tabs-1">Fedora hosted projects</a></li>
+                        <li><a href="#tabs-1">Fedora pagure and github projects</a></li>
                         <li><a href="#tabs-2">Bugzilla</a></li>
                     </ul>
                     <div class="clear"></div>
diff --git a/roles/easyfix/gather/templates/gather_easyfix.py b/roles/easyfix/gather/templates/gather_easyfix.py
index 14bba92..13c1d4d 100755
--- a/roles/easyfix/gather/templates/gather_easyfix.py
+++ b/roles/easyfix/gather/templates/gather_easyfix.py
@@ -41,8 +41,7 @@ from kitchen.text.converters import to_bytes
 from jinja2 import Template
 
 __version__ = '0.1.1'
-bzclient = RHBugzilla(url='https://bugzilla.redhat.com/xmlrpc.cgi',
-   cookiefile=None)
+bzclient = RHBugzilla(url='https://bugzilla.redhat.com/xmlrpc.cgi', cookiefile=None, tokenfile=None)
 # So the bugzilla module has some way to complain
 logging.basicConfig()
 logger = logging.getLogger('bugzilla')
@@ -173,27 +172,6 @@ def gather_project():
     return projects
 
 
-def get_open_tickets_for_keyword(project, keyword):
-    """ For a given project return the tickets ID which have the given
-    keyword attached.
-    :arg project, name of the project on fedorahosted.org
-    :arg keyword, search the trac for open tickets having this keyword
-    in the keywords field.
-    """
-    tickets = []
-    try:
-        server = xmlrpclib.ServerProxy(
-            'https://fedorahosted.org/%s/rpc' % project)
-        query = 'status=assigned&status=new&status=reopened&' \
-            'keywords=~%s' % keyword
-        for ticket in server.ticket.query(query):
-            tickets.append(server.ticket.get(ticket))
-    except xmlrpclib.Error, err:
-        print '   Could not retrieve information for project: %s' % project
-        print '   Error: %s' % err
-    return tickets
-
-
 def parse_arguments():
     parser = argparse.ArgumentParser(__doc__)
     parser.add_argument(
@@ -269,21 +247,6 @@ def main():
                         project.name, ticket['id'])
                     ticketobj.status = ticket['status']
                     tickets.append(ticketobj)
-        else:
-            project.url = 'https://fedorahosted.org/%s/' % (project.name)
-            project.site = 'trac'
-            for ticket in get_open_tickets_for_keyword(project.name,
-                    project.tag):
-                ticket_num = ticket_num + 1
-                ticketobj = Ticket()
-                ticketobj.id = ticket[0]
-                ticketobj.title = ticket[3]['summary']
-                ticketobj.url = 'https://fedorahosted.org/%s/ticket/%s' %(
-                    project.name, ticket[0])
-                ticketobj.status = ticket[3]['status']
-                ticketobj.type = ticket[3]['type']
-                ticketobj.component = ticket[3]['component']
-                tickets.append(ticketobj)
         project.tickets = tickets
 
     bzbugs = gather_bugzilla_easyfix()
-- 
1.8.3.1

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
infrastructure mailing list -- infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to infrastructure-leave@xxxxxxxxxxxxxxxxxxxxxxx

[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux