• 
      

    Avoid TypeError while coercing string to int

    Review Request #9940 — Created May 15, 2018 and submitted

    Information

    RBTools
    release-1.0.x
    be2c67d...

    Reviewers

    A change in the rbtools patch support a while back regressed the
    behaviour of the -p flag that is passed to patch(1). We now no longer
    assume that is an int and just splat it into the string to avoid a
    TypeError when p is a string like '4'.

    Ran unit tests.

    Description From Last Updated

    We should convert to int before doing this check, no? '-1' >= 0 returns True. Alternatively, I think this is …

    daviddavid
    david
    1. 
        
    2. rbtools/clients/__init__.py (Diff revision 1)
       
       
      Show all issues

      We should convert to int before doing this check, no? '-1' >= 0 returns True.

      Alternatively, I think this is effectively a None check, so this can probably be if p_num is not None.

    3. 
        
    brennie
    david
    1. Ship It!
    2. 
        
    brennie
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-1.0.x (cffad86)