• 
      

    Fixed rbt patch to work with $EDITOR that has spaces

    Review Request #6784 — Created Jan. 16, 2015 and submitted

    Information

    RBTools
    master
    dc34986...

    Reviewers

    Before, it was looking for the executable with exactly
    the name in $EDITOR, spaces and all, and failing to find it.
    Now it splits it up by spaces before calling the shell.

    Fixes issue: Issue 3652: rbt patch throws "OSError: [Errno 2] No such file or directory" if EDITOR contains flags

    From the issue.

    EDITOR="vim -X" python -c "from rbtools.utils.console import edit_text; edit_text('')"
    

    Before, it crashed, now it does not.

    Description From Last Updated

    There's a right square bracket with no left square bracket.

    VT VTL-Developer
    reviewbot
    1. Tool: PEP8 Style Checker
      Processed Files:
          rbtools/utils/console.py
      
      
      
      Tool: Pyflakes
      Processed Files:
          rbtools/utils/console.py
      
      
    2. 
        
    mike_conley
    1. This looks good to me. Thanks!

    2. 
        
    brennie
    1. Ship It!
    2. 
        
    JY
    1. Can .split(' ') be replaced with .split() to do the same functionality?

      1. Sure, it looks like it's actually a better algorithm altogether when you specify None or no argument.
        If there's a run of multiple spaces your method will work better.

    2. 
        
    VT
    1. 
        
    2. rbtools/utils/console.py (Diff revision 1)
       
       
      Show all issues

      There's a right square bracket with no left square bracket.

    3. 
        
    TB
    reviewbot
    1. Tool: PEP8 Style Checker
      Processed Files:
          rbtools/utils/console.py
      
      
      
      Tool: Pyflakes
      Processed Files:
          rbtools/utils/console.py
      
      
    2. 
        
    chipx86
    1. Ship It!
    2. 
        
    TB
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to master (a38ca9b)