Browse Source

For Trac #342

For some stderr output add missing newlines.
(I noticed an error message was overwritten and was unreadable.)

Also removed accidental logging details from stderr write output.

Patch reviewed via jabber.
Not completely tested as I didn't reproduce all errors.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@2949 e5f2f494-b856-4b98-b285-d166d9295462
Jeremy C. Reed 14 years ago
parent
commit
c11617b770
3 changed files with 13 additions and 9 deletions
  1. 4 0
      ChangeLog
  2. 5 5
      src/bin/xfrout/xfrout.py.in
  3. 4 4
      src/bin/zonemgr/zonemgr.py.in

+ 4 - 0
ChangeLog

@@ -1,3 +1,7 @@
+  95.	[bug]		jreed
+	bin/xfrout and bin/zonemgr: Fixed some stderr output.
+	(Trac #342, svn r2949)
+
   94.	[bug]		jelte
   	bin/xfrout:  Fixed a problem in xfrout where only 2 or 3 RRs
 	were used per DNS message in the xfrout stream.

+ 5 - 5
src/bin/xfrout/xfrout.py.in

@@ -320,7 +320,7 @@ class UnixSockServer(ThreadingUnixStreamServer):
             try:
                 os.unlink(sock_file)
             except OSError as err:
-                sys.stderr.write('[b10-xfrout] Fail to remove file %s: %s' % (sock_file, err))
+                sys.stderr.write('[b10-xfrout] Fail to remove file %s: %s\n' % (sock_file, err))
                 sys.exit(0)
    
     def _sock_file_in_use(self, sock_file):
@@ -520,15 +520,15 @@ if '__main__' == __name__:
         xfrout_server = XfroutServer()
         xfrout_server.run()
     except KeyboardInterrupt:
-        sys.stderr.write("[b10-xfrout] exit xfrout process")
+        sys.stderr.write("[b10-xfrout] exit xfrout process\n")
     except SessionError as e:
         sys.stderr.write("[b10-xfrout] Error creating xfrout, "
-                           "is the command channel daemon running?")
+                           "is the command channel daemon running?\n")
     except SessionTimeout as e:
         sys.stderr.write("[b10-xfrout] Error creating xfrout, " 
-                           "is the configuration manager running?")
+                           "is the configuration manager running?\n")
     except ModuleCCSessionError as e:
-        sys.stderr.write("info", '[b10-xfrout] exit xfrout process:', e)
+        sys.stderr.write("[b10-xfrout] exit xfrout process:%s\n" % str(e))
 
     if xfrout_server:
         xfrout_server.shutdown()

+ 4 - 4
src/bin/zonemgr/zonemgr.py.in

@@ -513,15 +513,15 @@ if '__main__' == __name__:
         zonemgrd = Zonemgr()
         zonemgrd.run()
     except KeyboardInterrupt:
-        sys.stderr.write("[b10-zonemgr] exit zonemgr process")
+        sys.stderr.write("[b10-zonemgr] exit zonemgr process\n")
     except isc.cc.session.SessionError as e:
         sys.stderr.write("[b10-zonemgr] Error creating zonemgr, " 
-                           "is the command channel daemon running?")
+                           "is the command channel daemon running?\n")
     except isc.cc.session.SessionTimeout as e:
         sys.stderr.write("[b10-zonemgr] Error creating zonemgr, " 
-                           "is the configuration manager running?")
+                           "is the configuration manager running?\n")
     except isc.config.ModuleCCSessionError as e:
-        sys.stderr.write("info", "[b10-zonemgr] exit zonemgr process:", e)
+        sys.stderr.write("[b10-zonemgr] exit zonemgr process: %s\n" % str(e))
 
     if zonemgrd:
         zonemgrd.shutdown()