Don't write normal operational message to stderr
This prevents sending out unnecessary mails when run from the related cron job: condense-mirrorlogs.cron -> condense-mirrorlogs.sh > /dev/null -> mirrorlist.py Additionally, report the failing file name in the case of an error. Signed-off-by: Nils Philippsen <nils@redhat.com>
This commit is contained in:
parent
6ecdab22c0
commit
369487a3bb
1 changed files with 3 additions and 3 deletions
|
@ -586,12 +586,12 @@ def parselog(our_file, out_file):
|
|||
|
||||
our_list = list(yumclients_set)
|
||||
our_list.sort()
|
||||
|
||||
|
||||
try:
|
||||
output = open(output_file,"a")
|
||||
sys.stderr.write("Outputting data: %s\n" % our_file)
|
||||
sys.stdout.write("Outputting data: %s\n" % our_file)
|
||||
except:
|
||||
sys.stderr.write("Unable to open outputfile\n")
|
||||
sys.stderr.write("Unable to open outputfile: %s\n" % our_file)
|
||||
sys.exit(-1)
|
||||
|
||||
for line in our_list:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue