Code0x58 commented on a change in pull request #3650:
URL: https://github.com/apache/incubator-heron/pull/3650#discussion_r541828521



##########
File path: heron/shell/src/python/handlers/killexecutorhandler.py
##########
@@ -44,13 +44,20 @@ def kill_parent():
       logger.info("Killing parent executor")
       os.killpg(os.getppid(), signal.SIGTERM)
 
+    def is_local():
+      remote_ip = self.request.remote_ip
+      if 'localhost' == remote_ip or '127.0.0.1' == remote_ip or '::1' == 
remote_ip:
+        return True
+      else:
+        return False

Review comment:
       :golf: 
   ```suggestion
         return self.request.remote_ip in ('localhost', '127.0.0.1', '::1')
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to