You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by gi...@git.apache.org on 2017/06/29 16:05:23 UTC

[GitHub] mrutkows commented on a change in pull request #149: Updating all Python files to have ASF licenses and pass PEP8 tests

mrutkows commented on a change in pull request #149: Updating all Python files to have ASF licenses and pass PEP8 tests
URL: https://github.com/apache/incubator-openwhisk-package-kafka/pull/149#discussion_r124843794
 
 

 ##########
 File path: provider/app.py
 ##########
 @@ -154,15 +173,17 @@ def healthRoute():
 def authorizedForTrigger(auth, consumer):
     triggerURL = urlparse(consumer.triggerURL)
 
-    return (auth != None and consumer != None and triggerURL.username == auth.username and triggerURL.password == auth.password)
+    return (auth is not None and consumer is not None and
+            triggerURL.username == auth.username and
+            triggerURL.password == auth.password)
 
 
 def createAndRunConsumer(triggerFQN, params, record=True):
-    if app.config['TESTING'] == True:
+    if app.config['TESTING'] is True:
         logging.debug("Just testing")
     else:
         # generate a random uuid for new triggers
-        if not 'uuid' in params:
+        if 'uuid' not in params:
 
 Review comment:
   Yes, it is more correct to test truth (boolean) in this manner in Python.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services