def _setup_twisted(self, raise_=True): # FIXME: figure out why twisted is already loaded # assert not 'twisted' in sys.modules from stoqlib.net import gtk2reactor from twisted.internet.error import ReactorAlreadyInstalledError try: gtk2reactor.install() except ReactorAlreadyInstalledError: if self._initial and raise_: raise
## GNU Lesser General Public License for more details. ## ## You should have received a copy of the GNU Lesser General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., or visit: http://www.gnu.org/. ## ## Author(s): Stoq Team <*****@*****.**> ## """ Crash report dialog """ # When running this file we need to explicitly say that we want to use # the gtk2reactor, otherwise the poll reactor will be installed when # t.i.reactor is first accessed/used. if __name__ == '__main__': # pragma: no cover from stoqlib.net import gtk2reactor gtk2reactor.install() import os import gtk from kiwi.component import get_utility from kiwi.ui.dialogs import HIGAlertDialog from twisted.internet import defer, reactor from stoqlib.api import api from stoqlib.gui.base.dialogs import get_current_toplevel from stoqlib.gui.widgets.hintedentry import HintedEntry from stoqlib.lib.crashreport import ReportSubmitter from stoqlib.lib.interfaces import IAppInfo from stoqlib.lib.translation import stoqlib_gettext