Mercurial > hg > egg-tcls
changeset 369:86adad909681
fetch_weather: Improve debugging and one error message.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 18 Dec 2015 10:10:03 +0200 |
parents | ed1c7f2d81df |
children | ce70b4b21e7a |
files | fetch_weather.pl |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/fetch_weather.pl Fri Dec 18 10:09:32 2015 +0200 +++ b/fetch_weather.pl Fri Dec 18 10:10:03 2015 +0200 @@ -504,8 +504,9 @@ ### if (opt_chk_valid("outfile", 1)) { + print STDERR "Dumping data to ".opt_get("outfile")."\n" if (opt_get_int("debug") > 0); close(STDOUT); - open(STDOUT, '>', opt_get("outfile")) or die("Could not open output file '".opt_get("outfile")."'.\n"); + open(STDOUT, '>', opt_get("outfile")) or die("Could not open output file '".opt_get("outfile")."': $!\n"); } binmode STDOUT, ':encoding(utf-8)';