Ticket #1663: 0001-pylint-W6501-fixes.patch

File 0001-pylint-W6501-fixes.patch, 1.8 KB (added by sascha_silbe, 11 years ago)

pylint W6501 fixes

  • src/sugar/logger.py

    From 18cfb9fade4cafb6b4b3dc6d83d0fd54715b39cd Mon Sep 17 00:00:00 2001
    From: Sascha Silbe <sascha@silbe.org>
    Date: Mon, 18 Jan 2010 18:07:19 +0000
    Subject: [PATCH 1/2] pylint W6501 fixes
    
    ---
     src/sugar/logger.py |    2 +-
     src/sugar/mime.py   |    6 +++---
     2 files changed, 4 insertions(+), 4 deletions(-)
    
    diff --git a/src/sugar/logger.py b/src/sugar/logger.py
    index 74d3d12..226fb4b 100644
    a b def set_level(level): 
    5858    try:
    5959        logging.getLogger('').setLevel(int(level))
    6060    except ValueError:
    61         logging.warning('Invalid log level: %r' % level)
     61        logging.warning('Invalid log level: %r', level)
    6262
    6363
    6464# pylint: disable-msg=E1101,F0401
  • src/sugar/mime.py

    diff --git a/src/sugar/mime.py b/src/sugar/mime.py
    index 059db4e..e1a880a 100644
    a b _black_list = [ 
    180180              ]
    181181
    182182def choose_most_significant(mime_types):
    183     logging.debug('Choosing between %r.' % mime_types)
     183    logging.debug('Choosing between %r.', mime_types)
    184184    if not mime_types:
    185185        return ''
    186186
    def choose_most_significant(mime_types): 
    200200
    201201                # take out the specifier after ';' that mozilla likes to add
    202202                mime_type = mime_type.split(';')[0]
    203                 logging.debug('Choosed %r!' % mime_type)
     203                logging.debug('Choosed %r!', mime_type)
    204204                return mime_type
    205205
    206206    if 'text/x-moz-url' in mime_types:
    def choose_most_significant(mime_types): 
    215215        logging.debug('Choosed text/plain!')
    216216        return 'text/plain'
    217217
    218     logging.debug('Returning first: %r.' % mime_types[0])
     218    logging.debug('Returning first: %r.', mime_types[0])
    219219    return mime_types[0]
    220220
    221221def split_uri_list(uri_list):