budtmo / docker-android

Android in docker solution with noVNC supported and video recording
Other
8.91k stars 1.21k forks source link

Check correctly if device exists #294

Closed ireneu closed 3 years ago

ireneu commented 3 years ago

config.ini has spaces around the equals sign

Purpose of changes

When restarting an emulated device, the is_initialized function checks if it exists by reading the emulator's config.ini file. The check didn't take into account whitespaces. This is now fixed.

Types of changes

Put an x in the boxes that apply

How has this been tested?

Tested on a emulator kill / restart scenario, verifying if new devices where initialized or previous ones restarted.

ireneu commented 3 years ago

Hey, got a little ahead of myself with the proposed fix. ini files can have spaces or not, ideally it should be checked using the Python built-in ConfigParser so that logic is cleaner. Let me know if the proposed solution (with config parser) suits you, and I will implement it.

ireneu commented 3 years ago

Also noticed PR #287 that attempted the same fix and was later reversed by @budtmo. I assume due to the inconsistencies in ini file formatting mentioned above.

codecov-commenter commented 3 years ago

Codecov Report

Merging #294 (337aaf5) into master (caf2cb2) will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #294   +/-   ##
=======================================
  Coverage   99.22%   99.23%           
=======================================
  Files           2        2           
  Lines         129      130    +1     
=======================================
+ Hits          128      129    +1     
  Misses          1        1           
Impacted Files Coverage Δ
src/app.py 99.20% <100.00%> (+<0.01%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update caf2cb2...337aaf5. Read the comment docs.

ireneu commented 3 years ago

Hi @budtmo, any chance you can take a look? ☺️

budtmo commented 3 years ago

Thank you @ireneu for the PR