コード例 #1
0
ファイル: gui_updater.py プロジェクト: Adastra-thw/w3af
 def __init__(self, force, log):
     UIUpdater.__init__(self, force=force, ask=ask, logger=log)
     self._dot_counter = 1
     
     #  Event registration
     self._register(
         VersionMgr.ON_ACTION_ERROR,
         notify,
         _('Update error, please update manually.')
     )
     self._register(
         VersionMgr.ON_UPDATE_ADDED_DEP,
         notify,
         _('New dependencies added, please restart w3af.')
     )
     
     #
     # I register to this event because it will get called once every time
     # the git client has performed some progress, which is ideal for me to
     # give the user some feedback on the download progress.
     #
     # Also, and given that the Splash window was coded in a kind of messy
     # way, it's my chance to call the push method, which will call the
     # window's mainloop and help me keep the window alive
     #
     self._register(
         VersionMgr.ON_PROGRESS,
         self._downloading,
         None,
     )
コード例 #2
0
ファイル: auto_update.py プロジェクト: zhuyue1314/w3af
    def __init__(self, force):
        UIUpdater.__init__(self, force=force, ask=ask, logger=om.out.console)

        # Show revisions logs function
        def show_log(msg, get_logs):
            if ask(msg):
                om.out.console(get_logs())

        # Add callbacks
        self._add_callback("callback_onupdate_confirm", ask)
        self._add_callback("callback_onupdate_show_log", show_log)
コード例 #3
0
ファイル: auto_update.py プロジェクト: weisst/w3af
    def __init__(self, force):
        UIUpdater.__init__(self, force=force, ask=ask, logger=om.out.console)

        # Show revisions logs function
        def show_log(msg, get_logs):
            if ask(msg):
                om.out.console(get_logs())

        # Add callbacks
        self._add_callback('callback_onupdate_confirm', ask)
        self._add_callback('callback_onupdate_show_log', show_log)