Message290658
Thanks for the discussion. I ended up doing something similar to the code snippet Christian posted, except I also had a second try/except FileNotFoundError within the original finally block to catch the case that David pointed out.
In retrospect, I probably should have used TemporaryDirectory since I am using Python 3.5 and because the file I was creating with NamedTemporaryFile was only being used as an output file, not an input file, to the subprocess command. |
|
Date |
User |
Action |
Args |
2017-03-27 21:34:41 | richardxia | set | recipients:
+ richardxia, rhettinger, christian.heimes, jwilk, r.david.murray, andrewnester |
2017-03-27 21:34:41 | richardxia | set | messageid: <1490650481.63.0.962945881999.issue29573@psf.upfronthosting.co.za> |
2017-03-27 21:34:41 | richardxia | link | issue29573 messages |
2017-03-27 21:34:41 | richardxia | create | |
|