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):
384
384
385
385
return self
386
386
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 ):
388
389
"""
389
- Append line to a config file (i.e. postgresql.conf) .
390
+ Append line to a config file.
390
391
391
392
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) .
394
395
395
396
Returns:
396
397
This instance of PostgresNode.
397
398
"""
398
399
399
400
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 ' ]))
402
403
403
404
return self
404
405
Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ def test_reload(self):
171
171
172
172
# change client_min_messages and save old value
173
173
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' )
175
175
176
176
# reload config
177
177
node .reload ()
You can’t perform that action at this time.
0 commit comments