Skip to content

Commit

Permalink
fix: use stdout instead of stderr for reading rpi-connect process out…
Browse files Browse the repository at this point in the history
…put - closes #174
  • Loading branch information
sassanh committed Jan 7, 2025
1 parent d650308 commit cf3c196
Show file tree
Hide file tree
Showing 3 changed files with 453 additions and 449 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- refactor(core): rerender screen when rendering on the display is resumed like when returning from viewfinder to avoid artifacts
- refactor(docker): make composition menus responsive: showing spinner, etc
- fix: pass raw bytes to `DisplayRenderEvent` and `DisplayCompressedRenderEvent` to avoid encoding issues
- fix: use stdout instead of stderr for reading rpi-connect process output - closes #174

## Version 1.1.0

Expand Down
8 changes: 4 additions & 4 deletions ubo_app/services/050-rpi-connect/sign_in_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ async def login(self: SignInPage) -> None:
'/usr/bin/env',
'rpi-connect',
'signin',
stdout=subprocess.DEVNULL,
stderr=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.DEVNULL,
)
if self.process.stderr is None:
if self.process.stdout is None:

Check warning on line 54 in ubo_app/services/050-rpi-connect/sign_in_page.py

View check run for this annotation

Codecov / codecov/patch

ubo_app/services/050-rpi-connect/sign_in_page.py#L54

Added line #L54 was not covered by tests
return
output = (await self.process.stderr.readline()).decode()
output = (await self.process.stdout.readline()).decode()

Check warning on line 56 in ubo_app/services/050-rpi-connect/sign_in_page.py

View check run for this annotation

Codecov / codecov/patch

ubo_app/services/050-rpi-connect/sign_in_page.py#L56

Added line #L56 was not covered by tests
regex = r'^Complete sign in by visiting (?P<url>[^\n]*)'
match = re.search(regex, output)
if match:
Expand Down
Loading

0 comments on commit cf3c196

Please sign in to comment.