Ensure data exists before attempting type translation

Review Request #7183 — Created April 7, 2015 and submitted

Information

RBTools
master
fca7d03...

Reviewers

If the case where Popen produces a non-zero return code, and
none_on_ignored_error is True, then data will be set to None.
For translating the results into the desired type, when
split_lines is true, then len(data) is checked which is not
valid for a NoneType object.

Fix is to ensure data is not None before attempting type
translation.
1) Replicated failure from https://groups.google.com/forum/#!topic/reviewboard/CYTxQ6ADe_M and confirmed the code mod resolves the issue.
2) Ran unit tests.
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        rbtools/utils/process.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        rbtools/utils/process.py
    
    
  2. 
      
brennie
  1. Ship It!
  2. 
      
gmyers
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-0.7.x (3afaf5d)
Loading...