fd1456ac36e0a1ebfb800c9593f1540858ca7bea,src/python/pants/backend/core/tasks/reporting_server.py,KillServer,execute,#KillServer#,114

Before Change



  def execute(self):
    info = ReportingServerManager.get_current_server_info()
    if not info:
      print("No server found.", file=sys.stderr)
    // There should only be one pidfile, but in case there are many, we kill them all here.
    for pidfile, pid, port in info:
      with open(pidfile, "r") as infile:
        pidstr = infile.read()
      try:

After Change


  def execute(self):
    server = ReportingServerManager(self.context, self.get_options())

    if not server.is_alive():
      logger.info("No server found.")
      return

    pid = server.pid

    try:
      logger.info("Killing server with {pid} at http://localhost:{port}"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: pantsbuild/pants
Commit Name: fd1456ac36e0a1ebfb800c9593f1540858ca7bea
Time: 2015-07-17
Author: kwilson@twopensource.com
File Name: src/python/pants/backend/core/tasks/reporting_server.py
Class Name: KillServer
Method Name: execute


Project Name: keras-team/autokeras
Commit Name: b048efa4f956b80266942caea6ee8b4311e1d17a
Time: 2018-04-08
Author: jin@tamu.edu
File Name: autokeras/classifier.py
Class Name: ClassifierBase
Method Name: fit