catchpoint / WebPageTest.visual-metrics

Calculate visual performance metrics from a video (Speed Index, Visual Complete, Incremental progress, etc)
BSD 3-Clause "New" or "Revised" License
153 stars 46 forks source link

Fix use string pattern on bytes-like object #35

Closed chess99 closed 3 years ago

chess99 commented 3 years ago

solved:

  1. deadlock on proc.poll( )
  2. TypeError: cannot use a string pattern on a bytes-like object
pmeenan commented 3 years ago

It would be better to pass universal_newlines=True to the Popen instead. That way it will be text output on both Pythoin 2.7 and 3.x. Otherwise, I think the decode might fail on Python 2.7 (which the code still supports).

chess99 commented 3 years ago

It would be better to pass universal_newlines=True to the Popen instead. That way it will be text output on both Pythoin 2.7 and 3.x. Otherwise, I think the decode might fail on Python 2.7 (which the code still supports).

PR updated