openmainframeproject / software-discovery-tool

Software Discovery Tool
Apache License 2.0
31 stars 40 forks source link

Edited fedora code to ignore error 404 messages, while creating fedora json files #162

Closed Princee215 closed 11 months ago

Princee215 commented 11 months ago

While creating Fedora files through ./bin/package_build.py. We face some errors while creating these files as can be seen in Issue #148. As mentioned directories are not present for following Fedora version-

Screenshot from 2023-07-29 22-56-22

So, what I did, I added continue instead of raising an error. Therefore, if some directory is not present for some distro version we'll just ignore that and iterate over to next directory. And except that I've also added 1 in dirs string as it'll cover a wider range and if some directory is not there it'll just ignore that and you won't see any errors in the terminal.

@pleia2 and @arshPratap please take a look at it.

arshPratap commented 11 months ago

@Princee215 looks good to me @pleia2 thoughts ?

arshPratap commented 11 months ago

@Princee215 lgtm.. Thanks for the contributions!

Princee215 commented 11 months ago

@pleia2, @arshPratap I've made some changes again, as discussed with Arsh, I've put the code in try catch block, and checked for a condition were we're checking if both of the links are not working. Still I've some doubts that we should output message if some directory is not present or we should ignore it? And should we put it in a try catch block too or is it fine as we're using now!

Take a look and let me know. I'll be happy to make changes.