File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -384,21 +384,22 @@ def get_auth_method(t):
384384
385385 return self
386386
387- def append_conf (self , filename , string ):
387+ @method_decorator (positional_args_hack (['filename' , 'line' ]))
388+ def append_conf (self , line , filename = PG_CONF_FILE ):
388389 """
389- Append line to a config file (i.e. postgresql.conf) .
390+ Append line to a config file.
390391
391392 Args:
392- filename: name of the config file .
393- string: string to be appended to config .
393+ line: string to be appended to config .
394+ filename: config file (postgresql.conf by default) .
394395
395396 Returns:
396397 This instance of PostgresNode.
397398 """
398399
399400 config_name = os .path .join (self .data_dir , filename )
400- with io .open (config_name , "a" ) as conf :
401- conf .write (u"" .join ([string , '\n ' ]))
401+ with io .open (config_name , 'a' ) as conf :
402+ conf .write (u'' .join ([line , '\n ' ]))
402403
403404 return self
404405
Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ def test_reload(self):
171171
172172 # change client_min_messages and save old value
173173 cmm_old = node .execute ('show client_min_messages' )
174- node .append_conf ('postgresql.conf' , ' client_min_messages = DEBUG1' )
174+ node .append_conf ('client_min_messages = DEBUG1' )
175175
176176 # reload config
177177 node .reload ()
You can’t perform that action at this time.
0 commit comments