Timeline for Simple log rotation script
Current License: CC BY-SA 4.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 12, 2019 at 7:34 | vote | accept | Dmitry Zinkevich | ||
| Jun 12, 2019 at 7:34 | comment | added | Dmitry Zinkevich | touch will work on the first run only if not exists(f) - but I agree, that create_empty would make much more sense | |
| Jun 12, 2019 at 4:56 | comment | added | Maarten Fabré | Since touch and gen_file don't need anything of the object, I would make them top level module functions | |
| Jun 11, 2019 at 15:31 | comment | added | 301_Moved_Permanently | No, I shouldn't even be here now, I’m a bit in a hurry now ;) | |
| Jun 11, 2019 at 15:30 | comment | added | Peilonrayz♦ | @MathiasEttinger Do you want to post an answer? Even if you copied your existing comments I'd upvote it :) | |
| Jun 11, 2019 at 15:28 | comment | added | 301_Moved_Permanently | Also, 10. Using os.rename instead of shutil.copyfile since you don't need copies anyway. | |
| Jun 11, 2019 at 15:24 | comment | added | Peilonrayz♦ | @MathiasEttinger That's a good point. It makes sense if it's renamed to make_empty. | |
| Jun 11, 2019 at 15:17 | comment | added | 301_Moved_Permanently | "I'm a bit confused why you want to touch everything." => I’m even more confused as it not only touch, but also clears the files. A simple touch would be open(file_name, 'a').close()… | |
| Jun 11, 2019 at 15:01 | history | answered | Peilonrayz♦ | CC BY-SA 4.0 |