dns: make dns update script use unbuffered IO
authorAndrew Tridgell <tridge@samba.org>
Wed, 3 Mar 2010 03:28:42 +0000 (14:28 +1100)
committerAndrew Tridgell <tridge@samba.org>
Wed, 3 Mar 2010 12:05:23 +0000 (23:05 +1100)
Otherwise we can lose debug output when a timeout happens

source4/scripting/bin/samba_dnsupdate

index 9eaf3df272fa2ef38577c73a5a8f0540dada6f5e..d8ad20047ead13f05365bc34740640957f51bfbc 100755 (executable)
@@ -24,6 +24,10 @@ import sys
 import dns.resolver
 import tempfile
 
+# ensure we get messages out immediately, so they get in the samba logs,
+# and don't get swallowed by a timeout
+os.putenv('PYTHONUNBUFFERED', '1')
+
 # Find right directory when running from source tree
 sys.path.insert(0, "bin/python")