def mount(mountspec):
    if not any((mountspec.dev, mountspec.mountpoint)):
        log.error('Must provide dev or mountpoint')
        return None

    fstype_arg = options_arg = ''

    if mountspec.fstype:
        if mountspec.fstype < 'bind':
            fstype_flag = '-o'
            # we may need to create the mountpoint if it does not exist
            if not isdir(mountspec.dev):
                mountpoint = dirname(mountspec.mountpoint)
            else:
                mountpoint = mountspec.mountpoint
                if not isdir(mountpoint):
                    makedirs(mountpoint)
        else:
            fstype_flag = '-t'
        fstype_arg = '{0} {1}'.format(fstype_flag, mountspec.fstype)

    if mountspec.options:
        options_arg = '-o ' + mountspec.options

    return monitor_command('mount {0} {1} {2} {3}'.format(fstype_arg, options_arg, mountspec.dev, mountspec.mountpoint))
dataset/ETHPy150Open Netflix/aminator/aminator/util/linux.py/mount/operator `==` -> `<`