'Gets the type of patch filename, such as cfg, zip, dat...'

def get_pat_filename_type(self, filename):

    if (filename is None):
        return None
    if ('    ' in filename):
        self.module.fail_json(msg='Error:    Patch    file    name    include    spaces.')
    iftype = None
    if filename.endswith('.PAT'):
        iftype = 'PAT'
    else:
        return None
    return iftype.upper()
