Fix possible IndexError (#5494)
Fix possible IndexError (#5494)

* only submit if value is not None or just whitespaces

* Address potential IndexError if subprocess command returns nothing

* lazy log

* Revert "only submit if value is not None or just whitespaces"

This reverts commit 9bf8e3a556d82262357325dd5f865aff7186b8a2.

* set version if there's a value

* Checks if subprocess output is not None

DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core