fix help arg search range

Review Request #7865 — Created Jan. 13, 2016 and discarded

Information

RBTools

Reviewers

if args include Chinese warning will show
/Library/Python/2.7/site-packages/RBTools-0.8a0.dev0-py2.7.egg/rbtools/c
ommands/main.py:101: UnicodeWarning: Unicode equal comparison failed to
convert both arguments to Unicode - interpreting them as being unequal
elif opt.help or '--help' in args or '-h' in args:


 
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        rbtools/commands/main.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        rbtools/commands/main.py
    
    
  2. 
      
DA
  1. 
      
  2. 
      
david
  1. I don't understand how this fixes the problem. What are the contents/types of the args list?

    1. Hi there, I'm new to ReviewBoard, and RBTool 0.7.7 still has Unicode issues?

      We use the official 'svn-hook-postcommit-review' script form github, and type some Chinese charactors in svn commit message, then we got:

      /usr/local/lib/python2.7/dist-packages/rbtools/commands/main.py:101: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
      elif opt.help or '--help' in args or '-h' in args:
      ...
      UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 0: ordinal not in range(128)

      How can we fix it?

  2. 
      
david
Review request changed
Status:
Discarded