fix: properly match main type

pull/12/head
Raphaël Vinot 2018-09-27 16:34:49 -04:00
parent f64c362c57
commit 418e7cc7f9
1 changed files with 4 additions and 1 deletions

View File

@ -89,6 +89,9 @@ class ShadowServerFetcher():
prefix = type_content.split('.')[0] prefix = type_content.split('.')[0]
config['name'] = '{}-{}'.format(prefix, '_'.join(type_details)) config['name'] = '{}-{}'.format(prefix, '_'.join(type_details))
if isinstance(type_details, str):
main_type = type_details
else:
main_type = type_details[0] main_type = type_details[0]
if main_type not in self.known_list_types: if main_type not in self.known_list_types:
self.logger.warning(f'Unknown type: {main_type}. Please update the config creator script.') self.logger.warning(f'Unknown type: {main_type}. Please update the config creator script.')