HyukjinKwon commented on a change in pull request #31239:
URL: https://github.com/apache/spark/pull/31239#discussion_r559896141



##########
File path: python/pyspark/worker.py
##########
@@ -501,11 +501,13 @@ def main(infile, outfile):
 
             except (resource.error, OSError, ValueError) as e:
                 # not all systems support resource limits, so warn instead of 
failing
+                lineno = getframeinfo(
+                    currentframe()).lineno + 1 if currentframe() is not None 
else 0

Review comment:
       Frame's `lineno` should always be an integer :
   ```python
   >>> import types
   >>> import inspect
   >>> types.TracebackType(None, inspect.currentframe(), 3, tb_lineno=None)
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
   TypeError: an integer is required (got type NoneType)
   ```




----------------------------------------------------------------
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to