sungpeo commented on a change in pull request #21538:
URL: https://github.com/apache/airflow/pull/21538#discussion_r805325566



##########
File path: airflow/models/dagbag.py
##########
@@ -284,7 +284,10 @@ def process_file(self, filepath, only_if_updated=True, 
safe_mode=True):
             self.log.exception(e)
             return []
 
-        if not zipfile.is_zipfile(filepath):
+        _, file_ext = os.path.splitext(os.path.split(filepath)[-1])
+        is_zipfile = file_ext != '.py' and zipfile.is_zipfile(filepath)
+
+        if not is_zipfile:

Review comment:
       I agree with that. I push new commit




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

To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to