code: def _getContextFactory(path, workbench):
      
      try:
          return succeed(getContextFactory(path))
      except IOError:
          d = prompt(workbench, u"E-mail entry", u"Enter e-mail:")
          d.addCallback(_makeCredentials, path, workbench)
          d.addCallback(lambda _result: getContextFactory(path))
          return d
docs: Get a context factory.
  
      If the client already has a credentials at path, use them.
      Otherwise, generate them at path. Notifications are reported to
      the given workbench.