@contextlib.contextmanager
def unset_organization():
 qapp = QApplication.instance()
 orgname = qapp.organizationName()
 qapp.setOrganizationName(None)
 try:
  (yield)
 finally:
  qapp.setOrganizationName(orgname)

@ contextlib . contextmanager def unset_organization ( ) : qapp = QApplication . instance ( ) orgname = qapp . organizationName ( ) qapp . setOrganizationName ( None ) try : ( yield ) finally : qapp . setOrganizationName ( orgname )
temporarily unset qapplication .