You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/03/02 19:51:48 UTC
[GitHub] [pulsar] mauza commented on a change in pull request #9773: [functions] Use std lib zipfile to check if python function is a .py or a .zip
mauza commented on a change in pull request #9773:
URL: https://github.com/apache/pulsar/pull/9773#discussion_r585862974
##########
File path: pulsar-functions/instance/src/main/python/python_instance_main.py
##########
@@ -113,7 +113,7 @@ def main():
zpfile = zipfile.ZipFile(str(args.py), 'r')
zpfile.extractall(os.path.dirname(str(args.py)))
sys.path.insert(0, os.path.dirname(str(args.py)))
- elif os.path.splitext(str(args.py))[1] == '.zip':
+ elif zipfile.is_zipfile(str(args.py)):
Review comment:
Yeah, I'm new to contributing so any direction on how to go about doing that would be helpful, but I'll dive in see if I can figure out how to create some tests around this.
----------------------------------------------------------------
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:
users@infra.apache.org