Fix an issue when attempting to detect an existing AVD image

Fixes #286.
This commit is contained in:
Scott Wallace 2021-05-05 10:04:46 +01:00 committed by GitHub
parent 49113f2cb4
commit fcb1f2ec31
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,7 +56,7 @@ def is_initialized(device_name) -> bool:
if os.path.exists(config_path): if os.path.exists(config_path):
logger.info('Found existing config file at {}.'.format(config_path)) logger.info('Found existing config file at {}.'.format(config_path))
with open(config_path, 'r') as f: with open(config_path, 'r') as f:
if any('hw.device.name={}'.format(device_name) in line for line in f): if any('hw.device.name = {}'.format(device_name) in line for line in f):
logger.info('Existing config file references {}. Assuming device was previously initialized.'.format(device_name)) logger.info('Existing config file references {}. Assuming device was previously initialized.'.format(device_name))
return True return True
else: else: