Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 592621 Details for
Bug 833007
[Patch] fixes for cases no CDS found and some enhancements for RHUI load balancer plugin
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
[PATCH 3/4] introduced _get_lb_from_file() to make it exceptional safe while loading CDS from list files
0003-introduced-_get_lb_from_file-to-make-loading-cds-fro.patch (text/plain), 1.34 KB, created by
Satoru SATOH
on 2012-06-18 12:14:32 UTC
(
hide
)
Description:
[PATCH 3/4] introduced _get_lb_from_file() to make it exceptional safe while loading CDS from list files
Filename:
MIME Type:
Creator:
Satoru SATOH
Created:
2012-06-18 12:14:32 UTC
Size:
1.34 KB
patch
obsolete
>From fd97716c33cebb46232b7c7166d4a8fe13b4ec37 Mon Sep 17 00:00:00 2001 >From: Satoru SATOH <ssato@redhat.com> >Date: Mon, 18 Jun 2012 19:26:05 +0900 >Subject: [PATCH 3/4] introduced _get_lb_from_file() to make > loading-cds-from-file exceptional safe > >--- > etc/rhui/client-yum-plugin/rhui-lb.py | 13 ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > >diff --git a/etc/rhui/client-yum-plugin/rhui-lb.py b/etc/rhui/client-yum-plugin/rhui-lb.py >index b9b4ada..3407dfc 100644 >--- a/etc/rhui/client-yum-plugin/rhui-lb.py >+++ b/etc/rhui/client-yum-plugin/rhui-lb.py >@@ -19,6 +19,13 @@ requires_api_version = '2.5' > plugin_type = (TYPE_CORE,) > > >+def _get_lb_from_file(list_file): >+ try: >+ return open(list_file).read().split() >+ except: >+ return [] >+ >+ > def postreposetup_hook(conduit): > """ > Once the repo has been set up, look to the load balancer listing file >@@ -43,9 +50,9 @@ def postreposetup_hook(conduit): > > # Read in the list of CDS load balancers > cds_list_filename = conduit.confString('main', 'cds_list_file') >- f = open(cds_list_filename, 'r') >- cds_balancers = f.read().split() >- f.close() >+ std_cds_balancers = _get_lb_from_file(cds_list_filename) >+ >+ cds_balancers = std_cds_balancers > > if not cds_balancers: > conduit.error(0, 'No CDS load balancers found in the lists.') >-- >1.7.10.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 833007
:
592615
|
592619
| 592621 |
592625