Reduce nested `if` blocks in stream handling
Reduce nested `if` blocks in stream handling

Change-Id: I283773fb6b68da1878ede9001d18b5b7d0aff569

gferon/pygerrit2,markon/pygerrit2,sonyxperiadev/pygerrit,dpursehouse/pygerrit,dpursehouse/pygerrit2,morucci/pygerrit,benjiii/pygerrit