@@ -221,7 +221,13 @@ def get_files_from_index(indexfile: str, silent=False) -> dict:
221221 # create files list
222222 files = {}
223223 for row in csv_rows :
224+ appname = row [csv_header ["name" ]]
225+ appversion = row [csv_header ["version" ]]
224226 filepath = row [csv_header ["descriptorPath" ]]
227+ if filepath == "" :
228+ if not silent :
229+ printerr ("%s: no descriptor" % appname )
230+ continue
225231 # descriptor path:
226232 if filepath .startswith ("/" ): # absolute, use as is
227233 filepath = Path (filepath )
@@ -234,19 +240,17 @@ def get_files_from_index(indexfile: str, silent=False) -> dict:
234240 identifier = file ["identifier" ]
235241 desc = file ["descriptor" ]
236242 # check that name and version strings match (fatal)
237- appname = row [csv_header ["name" ]]
238- appversion = row [csv_header ["version" ]]
239- if appname != desc ["name" ] and not silent :
240- printerr ("%s: app name '%s' doesn't match descriptor '%s'"
243+ if appname != desc ["name" ]:
244+ printerr ("%s: skipped: app name '%s' doesn't match descriptor '%s'"
241245 % (filepath , appname , desc ["name" ]))
242246 continue
243- if appversion != desc ["tool-version" ] and not silent :
244- printerr ("%s: app version '%s' doesn't match descriptor '%s'"
247+ if appversion != desc ["tool-version" ]:
248+ printerr ("%s: skipped: app version '%s' doesn't match descriptor '%s'"
245249 % (filepath , appname , desc ["tool-version" ]))
246250 continue
247251 # check for normalized descriptor filename (just a warning)
248252 normname = descriptor_filename (appname , appversion )
249- if os .path .basename (filepath ) != normname :
253+ if os .path .basename (filepath ) != normname and not silent :
250254 printerr ("warning: %s: incorrect descriptor filename, should be '%s'"
251255 % (filepath , normname ))
252256 # add file to list
0 commit comments