def add_enclosure(self, enclosure, blocking=True, verbose=False):
        task, body = self._con.post(uri['enclosures'], enclosure)
        if enclosure['state'] is 'Monitored':
            tout = 600
        elif enclosure['firmwareBaselineUri'] is None:
            tout = 600
        else:
            tout = 3600

        if blocking is True:
            task = self._activity.wait4task(task, tout, verbose=verbose)
            if task in 'type' and task['type'].startswith('Task'):
                entity = self._activity.get_task_associated_resource(task)
                enclosure = self._con.get(entity['resourceUri'])
                return enclosure
        return task
dataset/ETHPy150Open HewlettPackard/python-hpOneView/hpOneView/servers.py/servers.add_enclosure/swapped operands of `in`