@@ -430,7 +430,7 @@ def start(self, params={}):
430430 log_filename = os .path .join (self .logs_dir , "postgresql.log" )
431431
432432 # choose conf_filename
433- conf_filename = os .path .join (self .data_dir , ' postgresql.conf' )
433+ conf_filename = os .path .join (self .data_dir , " postgresql.conf" )
434434
435435 _params = {
436436 "-D" : self .data_dir ,
@@ -442,26 +442,26 @@ def start(self, params={}):
442442 try :
443443 self .pg_ctl ("start" , _params )
444444 except ClusterException as e :
445- def print_log_file ( log_file ):
446- if os .path .exists (log_file ):
447- with open (log_filename , 'r' ) as logfile :
448- print (logfile .read ())
445+ def print_node_file ( node_file ):
446+ if os .path .exists (node_file ):
447+ with open (node_file , 'r' ) as f :
448+ print (f .read ())
449449 else :
450- print ("File not found: {}" .format (log_file ))
450+ print ("File not found: {}" .format (node_file ))
451451
452452 # show pg_ctl LOG
453453 print ("\n pg_ctl log:\n ----" )
454454 print (str (e ))
455455
456456 # show postmaster LOG
457457 print ("\n {}:\n ----" .format (log_filename ))
458- print_log_file (log_filename )
458+ print_node_file (log_filename )
459459
460460 # show CONFIG
461461 print ("\n {}:\n ----" .format (conf_filename ))
462- print_log_file (conf_filename )
462+ print_node_file (conf_filename )
463463
464- raise ClusterException ("Cannot start node {}" , self .node )
464+ raise ClusterException ("Cannot start node {}" . format ( self .name ) )
465465
466466 self .working = True
467467 return self
0 commit comments