On 09/29/2011 08:46 PM, Ville Skyttä wrote:
> On 09/29/2011 07:41 AM, seth vidal wrote:
>
>> http://skvidal.fedorapeople.org/misc/nag-once.py
>
> Looks like something that would work fine for me, thanks.
>
> Attached is a patch with some improvements:
> - Get rid of dependency on hashlib
> - Make dir names less likely to clash, add nag-once prefix
> - Don't wait for input on tty stdin on error (e.g. usage)
One more fix attached: don't print empty input to avoid empty mail being
sent.
--- nag-once.py~ 2011-09-29 20:39:25.453927468 +0300
+++ nag-once.py 2011-10-01 09:12:48.352139868 +0300
@@ -85,7 +85,8 @@
# out of sys.stdin :(
if theinput != old_output or (tti and now - old_date > tti):
- print theinput
+ if theinput:
+ print theinput
fo = open(mydir + '/output', 'w')
fo.write(theinput)
fo.flush()
_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel