GitHub user sebbASF opened an issue:

    https://github.com/apache/incubator-ponymail/issues/359

    Bug: archiver traverses multi-part message parts twice

    The archiver code includes the following:
    
    ```
    if msg.is_multipart():
        for part in msg.walk():
            if part.is_multipart(): 
                for subpart in part.walk():
    ```
    
    However the walk() iterator already includes nested sub-parts it its 
processing.
    
    As it happens this cannot affect the code output because only the first 
matching part will be used, but it is wasteful. Furthermore, walk can also be 
used on a non-multipart message, which allows the code to be much simplified.

----

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to