[ 
https://issues.apache.org/jira/browse/BEAM-4003?focusedWorklogId=118513&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-118513
 ]

ASF GitHub Bot logged work on BEAM-4003:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/Jul/18 00:44
            Start Date: 03/Jul/18 00:44
    Worklog Time Spent: 10m 
      Work Description: cclauss commented on a change in pull request #5373: 
[BEAM-4003] Futurize runners subpackage
URL: https://github.com/apache/beam/pull/5373#discussion_r199657561
 
 

 ##########
 File path: sdks/python/apache_beam/runners/worker/worker_id_interceptor.py
 ##########
 @@ -39,8 +39,8 @@ class 
WorkerIdInterceptor(grpc.StreamStreamClientInterceptor):
   # and throw exception in worker_id_interceptor.py after we have rolled out
   # the corresponding container changes.
   # Unique worker Id for this worker.
-  _worker_id = os.environ['WORKER_ID'] if os.environ.has_key(
-      'WORKER_ID') else str(uuid.uuid4())
+  _worker_id = os.environ['WORKER_ID'] if 'WORKER_ID' in os.environ else \
+      str(uuid.uuid4())
 
 Review comment:
   OUCH...  Backshash is a bad idea (see PEP8).  One space character to the 
right of the backslach and the script breaks on a change that is not visible to 
the reader.  What about ___worker_id = os.environ.get('WORKER_ID', 
str(uuid.uuid4()))__ instead?

----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 118513)
    Time Spent: 2h 40m  (was: 2.5h)

> Futurize and fix python 2 compatibility for runners subpackage
> --------------------------------------------------------------
>
>                 Key: BEAM-4003
>                 URL: https://issues.apache.org/jira/browse/BEAM-4003
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-py-core
>            Reporter: Robbe
>            Assignee: Matthias Feys
>            Priority: Major
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to