Browse Source

don't pass Exception objects directly to stderr.write() (via log_error()):
convert them with str() first.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1620 e5f2f494-b856-4b98-b285-d166d9295462

JINMEI Tatuya 15 years ago
parent
commit
baaf85cb86
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/bin/xfrin/xfrin.py.in

+ 3 - 3
src/bin/xfrin/xfrin.py.in

@@ -273,7 +273,7 @@ def process_xfrin(xfrin_recorder, zone_name, db_file,
                            master_addr, int(port), check_soa, verbose)
                            master_addr, int(port), check_soa, verbose)
         conn.do_xfrin(False)
         conn.do_xfrin(False)
     except Exception as e:
     except Exception as e:
-        log_error(e)
+        log_error(str(e))
 
 
     xfrin_recorder.decrement(zone_name)
     xfrin_recorder.decrement(zone_name)
 
 
@@ -464,10 +464,10 @@ if __name__ == '__main__':
     except KeyboardInterrupt:
     except KeyboardInterrupt:
         log_error("exit b10-xfrin")
         log_error("exit b10-xfrin")
     except isc.cc.session.SessionError as e:
     except isc.cc.session.SessionError as e:
-        log_error(e)
+        log_error(str(e))
         log_error('Error happened! is the command channel daemon running?')
         log_error('Error happened! is the command channel daemon running?')
     except Exception as e:
     except Exception as e:
-        log_error(e)
+        log_error(str(e))
 
 
     if xfrind:
     if xfrind:
         xfrind.shutdown()
         xfrind.shutdown()