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 921094 Details for
Bug 1123524
Don't add stream handler to root logger in library
[?]
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 which fixes the bug
0001-Configure-logging-in-cli-instead-of-library.patch (text/plain), 1.37 KB, created by
Pavol Babinčák
on 2014-07-25 23:25:25 UTC
(
hide
)
Description:
Patch which fixes the bug
Filename:
MIME Type:
Creator:
Pavol Babinčák
Created:
2014-07-25 23:25:25 UTC
Size:
1.37 KB
patch
obsolete
>From 005aebdde013b2b13ce7b6eb135eef1d983ba06a Mon Sep 17 00:00:00 2001 >From: Pavol Babincak <pbabinca@redhat.com> >Date: Sat, 26 Jul 2014 01:19:19 +0200 >Subject: [PATCH] Configure logging in cli instead of library > >In library use do-nothing logging handler and let users to configure it >to their needs. > >Resolves: rhbz#1123524 >--- > pkgdb2_cli.py | 1 + > pkgdb2client.py | 12 +++++++++++- > 2 files changed, 12 insertions(+), 1 deletion(-) > >diff --git a/pkgdb2_cli.py b/pkgdb2_cli.py >index f5098dc..592c47c 100644 >--- a/pkgdb2_cli.py >+++ b/pkgdb2_cli.py >@@ -707,6 +707,7 @@ def main(): > BOLD = "" > RESET = "" > >+ logging.basicConfig() > if arg.debug: > LOG.setLevel(logging.DEBUG) > PKGDBLOG.setLevel(logging.DEBUG) >diff --git a/pkgdb2client.py b/pkgdb2client.py >index bf35bb8..9f3eaed 100644 >--- a/pkgdb2client.py >+++ b/pkgdb2client.py >@@ -29,9 +29,19 @@ from fedora.client import AuthError > import requests > > >-logging.basicConfig() >+class NullHandler(logging.Handler): >+ ''' Null logger to avoid spurious messages >+ >+ ''' >+ def emit(self, record): >+ pass >+ > LOG = logging.getLogger("pkgdb2client") > >+# Add the null handler to top-level logger used by the library >+h = NullHandler() >+LOG.addHandler(h) >+ > __version__ = pkg_resources.get_distribution('packagedb-cli').version > PKGDB_URL = r'https://admin.fedoraproject.org/pkgdb/' > >-- >1.9.3 >
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 1123524
: 921094