[Git][NTPsec/ntpsec][master] ntplogtemp: Fix printing blank line on exit
Richard Laager (@rlaager)
gitlab at mg.gitlab.com
Wed May 11 01:31:54 UTC 2022
Richard Laager pushed to branch master at NTPsec / ntpsec
Commits:
fc7697e9 by Richard Laager at 2022-05-10T20:31:39-05:00
ntplogtemp: Fix printing blank line on exit
This was leading to cron mail to a user every 5 minutes.
- - - - -
1 changed file:
- ntpclients/ntplogtemp.py
Changes:
=====================================
ntpclients/ntplogtemp.py
=====================================
@@ -107,7 +107,7 @@ class CpuTemp:
self.has_sensors = False
if args.verbose:
sys.stderr.write("No sensors returned temperatures. ",
- "Have you run sensors-detect?")
+ "Have you run sensors-detect?\n")
return _data
@@ -308,11 +308,10 @@ def log_data():
args = parser.parse_args()
if os.getuid():
- sys.stderr.write("You must be root!")
+ sys.stderr.write("You must be root!\n")
sys.exit(1)
try:
log_data()
-except (KeyboardInterrupt, SystemExit):
+except KeyboardInterrupt:
print("") # be nice to bash
- sys.exit(0)
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/fc7697e91973b81d6e6420fa287792ecf2301a96
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/fc7697e91973b81d6e6420fa287792ecf2301a96
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20220511/1cde0fb5/attachment-0001.htm>
More information about the vc
mailing list