diff --git a/roles/base/files/common-scripts/nag-once b/roles/base/files/common-scripts/nag-once index 992023cacf..aef5999d55 100755 --- a/roles/base/files/common-scripts/nag-once +++ b/roles/base/files/common-scripts/nag-once @@ -7,6 +7,7 @@ # copyright (c) 2011 Red Hat, inc # gpl v2 blah blah # skvidal - skvidal@fedoraproject.org +from __future__ import print_function import tempfile import sys @@ -86,23 +87,23 @@ def main(): if theinput != old_output or (tti and now - old_date > tti): if theinput.strip(): # if there is nothing here, don't output and don't drop a \n on the end of it - print theinput, + print(theinput,) fo = open(mydir + '/output', 'w') fo.write(theinput) fo.flush() fo.close() - except Exception, e: - print >> sys.stderr, e - print >> sys.stderr, theinput + except Exception as e: + print(e, file=sys.stderr) + print(theinput, file=sys.stderr) if __name__ == '__main__': try: main() - except Exception, e: - print >> sys.stderr, e + except Exception as e: + print(e, file=sys.stderr) if not sys.stdin.isatty(): - print >> sys.stderr, sys.stdin.read() + print(sys.stdin.read(), file=sys.stderr)