Added try except block

Added try except block for non-RHEL and non-Fedora machines.

Reviewed By: Swapna Krishnan <skrishna@redhat.com>