Felix C. Stegerman <f...@obfusk.net> added the comment:

> The __getattr__ hack is not needed. You can reset the flags in a different, 
> more straight forward way

As mentioned, ZipFile._open_to_write() will modify the ZipInfo's .external_attr 
when it is set to 0.

> I just found another specific example in _open_to_write().  0 is a valid 
> value for zinfo.external_attr.  But this code always forces 0 to something 
> else:
>
>     if not zinfo.external_attr:
>         zinfo.external_attr = 0o600 << 16  # permissions: ?rw-------

Your alternative doesn't seem to take that subsequent modification into account.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43547>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to