Avoid TypeError while coercing string to int

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

brennie
RBTools
release-1.0.x
4364
be2c67d...
rbtools

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.

  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
david
  1. 
      
  2. rbtools/clients/__init__.py (Diff revision 1)
     
     

    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: Closed (submitted)

Change Summary:

Pushed to release-1.0.x (cffad86)
Loading...