Message330881
Yeah, the TarFile class would fix up the header when the user calls “close”. I think this is how it was done for ZipFile (implemented in Issue 26039).
Yes currently you would have to build the tarinfo object by hand. I think a helper function would be nice, but the “TarFile.gettarinfo” method is not a good place for that. In fact, documenting the default settings for the TarInfo constructor may be enough. Then you might get away with the following if you just want a regular file with no specific attributes:
download_tarinfo = TarInfo('index.html')
svgz_tarinfo = TarInfo('image.svg.gz') |
|
Date |
User |
Action |
Args |
2018-12-02 12:01:37 | martin.panter | set | recipients:
+ martin.panter, mgorny, remi.lapeyre |
2018-12-02 12:01:37 | martin.panter | set | messageid: <1543752097.79.0.788709270274.issue35227@psf.upfronthosting.co.za> |
2018-12-02 12:01:37 | martin.panter | link | issue35227 messages |
2018-12-02 12:01:37 | martin.panter | create | |
|