当前位置: 首页>>代码示例>>Python>>正文


Python webkit_logging.log函数代码示例

本文整理汇总了Python中webkitpy.webkit_logging.log函数的典型用法代码示例。如果您正苦于以下问题:Python log函数的具体用法?Python log怎么用?Python log使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了log函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: begin_work_queue

 def begin_work_queue(self):
     log("CAUTION: %s will discard all local changes in \"%s\"" % (self.name, self.tool.scm().checkout_root))
     if self.options.confirm:
         response = self.tool.user.prompt("Are you sure?  Type \"yes\" to continue: ")
         if (response != "yes"):
             error("User declined.")
     log("Running WebKit %s." % self.name)
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:7,代码来源:queues.py

示例2: update_status

    def update_status(self, queue_name, status, patch=None, results_file=None):
        # During unit testing, host is None
        if not self.host:
            return

        log(status)
        return NetworkTransaction().run(lambda: self._post_to_server(queue_name, status, patch, results_file))
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:7,代码来源:statusserver.py

示例3: run

    def run(self):
        self._begin_logging()

        self._delegate.begin_work_queue()
        while (self._delegate.should_continue_work_queue()):
            try:
                self._ensure_work_log_closed()
                work_item = self._delegate.next_work_item()
                if not work_item:
                    self._sleep("No work item.")
                    continue
                if not self._delegate.should_proceed_with_work_item(work_item):
                    self._sleep("Not proceeding with work item.")
                    continue

                # FIXME: Work logs should not depend on bug_id specificaly.
                #        This looks fixed, no?
                self._open_work_log(work_item)
                try:
                    self._delegate.process_work_item(work_item)
                except ScriptError, e:
                    # Use a special exit code to indicate that the error was already
                    # handled in the child process and we should just keep looping.
                    if e.exit_code == self.handled_error_code:
                        continue
                    message = "Unexpected failure when landing patch!  Please file a bug against webkit-patch.\n%s" % e.message_with_output()
                    self._delegate.handle_unexpected_error(work_item, message)
            except KeyboardInterrupt, e:
                log("\nUser terminated queue.")
                return 1
            except Exception, e:
                traceback.print_exc()
                # Don't try tell the status bot, in case telling it causes an exception.
                self._sleep("Exception while preparing queue")
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:34,代码来源:queueengine.py

示例4: ensure_clean_working_directory

 def ensure_clean_working_directory(self, force_clean):
     if not force_clean and not self.working_directory_is_clean():
         print run_command(self.status_command(), error_handler=Executive.ignore_error)
         raise ScriptError(message="Working directory has modifications, pass --force-clean or --no-clean to continue.")
     
     log("Cleaning working directory")
     self.clean_working_directory()
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:7,代码来源:scm.py

示例5: _fetch_list_of_patches_to_process

 def _fetch_list_of_patches_to_process(self, options, args, tool):
     all_patches = []
     for bug_id in args:
         patches = tool.bugs.fetch_bug(bug_id).reviewed_patches()
         log("%s found on bug %s." % (pluralize("reviewed patch", len(patches)), bug_id))
         all_patches += patches
     return all_patches
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:7,代码来源:download.py

示例6: bug_id_for_attachment_id

    def bug_id_for_attachment_id(self, attachment_id):
        self.authenticate()

        attachment_url = self.attachment_url_for_id(attachment_id, 'edit')
        log("Fetching: %s" % attachment_url)
        page = self.browser.open(attachment_url)
        return self._parse_bug_id_from_attachment_page(page)
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:7,代码来源:bugzilla.py

示例7: prompt_for_component

 def prompt_for_component(self, components):
     log("Please pick a component:")
     i = 0
     for name in components:
         i += 1
         log("%2d. %s" % (i, name))
     result = int(User.prompt("Enter a number: ")) - 1
     return components[result]
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:8,代码来源:bugzilla.py

示例8: _guess_reviewer_from_bug

 def _guess_reviewer_from_bug(self, bug_id):
     patches = self._tool.bugs.fetch_bug(bug_id).reviewed_patches()
     if len(patches) != 1:
         log("%s on bug %s, cannot infer reviewer." % (pluralize("reviewed patch", len(patches)), bug_id))
         return None
     patch = patches[0]
     log("Guessing \"%s\" as reviewer from attachment %s on bug %s." % (patch.reviewer().full_name, patch.id(), bug_id))
     return patch.reviewer().full_name
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:8,代码来源:updatechangelogswithreviewer.py

示例9: run

 def run(self, state):
     if not self._options.build:
         return
     log("Building WebKit")
     if self._options.build_style == "both":
         self.build("debug")
         self.build("release")
     else:
         self.build(self._options.build_style)
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:9,代码来源:build.py

示例10: run_and_handle_errors

 def run_and_handle_errors(self, tool, options, state=None):
     if not state:
         state = {}
     try:
         self._run(tool, options, state)
     except CheckoutNeedsUpdate, e:
         log("Commit failed because the checkout is out of date.  Please update and try again.")
         log("You can pass --no-build to skip building/testing after update if you believe the new commits did not affect the results.")
         QueueEngine.exit_after_handled_error(e)
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:9,代码来源:stepsequence.py

示例11: execute

    def execute(self, options, args, tool):
        if args:
            bug_ids = self._find_bugs_in_iterable(args)
        else:
            # This won't open bugs until stdin is closed but could be made to easily.  That would just make unit testing slightly harder.
            bug_ids = self._find_bugs_in_iterable(sys.stdin)

        log("%s bugs found in input." % len(bug_ids))

        self._open_bugs(bug_ids)
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:10,代码来源:openbugs.py

示例12: run

 def run(self, state):
     if not self._options.obsolete_patches:
         return
     bug_id = state["bug_id"]
     patches = self._tool.bugs.fetch_bug(bug_id).patches()
     if not patches:
         return
     log("Obsoleting %s on bug %s" % (pluralize("old patch", len(patches)), bug_id))
     for patch in patches:
         self._tool.bugs.obsolete_attachment(patch.id())
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:10,代码来源:obsoletepatches.py

示例13: run

    def run(self, state):
        commit_comment = bug_comment_from_commit_text(self._tool.scm(), state["commit_text"])
        comment_text = "Reverted r%s for reason:\n\n%s\n\n%s" % (state["revision"], state["reason"], commit_comment)

        bug_id = state["bug_id"]
        if not bug_id:
            log(comment_text)
            log("No bugs were updated.")
            return
        self._tool.bugs.reopen_bug(bug_id, comment_text)
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:10,代码来源:reopenbugafterrollout.py

示例14: execute

    def execute(self, options, args, tool):
        self._prepare_to_process(options, args, tool)
        patches = self._fetch_list_of_patches_to_process(options, args, tool)

        # It's nice to print out total statistics.
        bugs_to_patches = self._collect_patches_by_bug(patches)
        log("Processing %s from %s." % (pluralize("patch", len(patches)), pluralize("bug", len(bugs_to_patches))))

        for patch in patches:
            self._process_patch(patch, options, args, tool)
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:10,代码来源:download.py

示例15: _needs_commit_queue

    def _needs_commit_queue(patch):
        if patch.commit_queue() == "+": # If it's already cq+, ignore the patch.
            log("%s already has cq=%s" % (patch.id(), patch.commit_queue()))
            return False

        # We only need to worry about patches from contributers who are not yet committers.
        committer_record = CommitterList().committer_by_email(patch.attacher_email())
        if committer_record:
            log("%s committer = %s" % (patch.id(), committer_record))
        return not committer_record
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:10,代码来源:queries.py


注:本文中的webkitpy.webkit_logging.log函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。