title: UnboundLocalError: local variable 'connector' referenced before assignment
body: <p>I have a error : UnboundLocalError: local variable 'connector' referenced before assignment. To self host, etc. I have declaration in my init.</p>
  <pre><code>class OdooUtility():
    connector = None
    driver = None
  
    def get_control(self):        
      try:
          connector= ODOO(self.host, port=self.port)
          connector.login(self.dbname, self.username, self.password)
      except Exception as e:
          print e.message
  
      control = connector.env['rm.control']
      control_ids = control.search([])
      c = control.browse(control_ids)
      res = []
      for row in c:
          res.append(row)
      return res
  </code></pre>
  <p>How can I fix this? Thanks for any help!</p>