importer: make lack of meta message more informative

This commit is contained in:
Louis Abel 2024-03-10 21:38:37 -07:00
parent 32642b1efd
commit d9e2f2b370
Signed by: label
GPG Key ID: 2A6975660E424560

View File

@ -780,12 +780,13 @@ class GitImport(Import):
metafile_to_use = sources_file
else:
#raise err.GenericError('sources or metadata file NOT found')
print('WARNING: There was no sources or metadata found. Making blank file.')
# There isn't a reason to make a blank file right now.
print('WARNING: There was no sources or metadata found.')
with open(metadata_file, 'w+') as metadata_handle:
pass
if not metafile_to_use:
print('There was no metadata file found. Skipping.')
print('Source: There was no metadata file found. Skipping import attempt.')
return False
sources_dict = self.parse_metadata_file(metafile_to_use)