'Return the proper mkfs executable based on fs'

def mkfs_exec(self, fstype):

    if (fstype == 'ext4'):
        if os.path.exists('/sbin/mkfs.ext4'):
            return 'mkfs'
        auto_mkfs = os.path.join(self.job.toolsdir, 'mkfs.ext4dev')
        if os.path.exists(auto_mkfs):
            return auto_mkfs
    else:
        return 'mkfs'
    raise NameError(('Error    creating    partition    for    filesystem    type    %s' % fstype))
