|
4 | 4 | import subprocess
|
5 | 5 | import unittest
|
6 | 6 |
|
7 |
| -from .init_helpers import init_params |
8 | 7 | from .storage.fs_backup import TestBackupDir
|
9 | 8 | from .gdb import GDBobj
|
| 9 | +from .init_helpers import init_params |
10 | 10 |
|
11 | 11 | warning = """
|
12 | 12 | Wrong splint in show_pb
|
@@ -132,12 +132,14 @@ def run(self, command, gdb=False, old_binary=False, return_id=True, env=None,
|
132 | 132 | def init(self, options=None, old_binary=False, skip_log_directory=False, expect_error=False, use_backup_dir=True):
|
133 | 133 | if options is None:
|
134 | 134 | options = []
|
135 |
| - return self.run(['init', ] + options, |
136 |
| - old_binary=old_binary, |
137 |
| - skip_log_directory=skip_log_directory, |
138 |
| - expect_error=expect_error, |
139 |
| - use_backup_dir=use_backup_dir |
140 |
| - ) |
| 135 | + return self.run([ |
| 136 | + 'init', |
| 137 | + ] + options, |
| 138 | + old_binary=old_binary, |
| 139 | + skip_log_directory=skip_log_directory, |
| 140 | + expect_error=expect_error, |
| 141 | + use_backup_dir=use_backup_dir |
| 142 | + ) |
141 | 143 |
|
142 | 144 | def add_instance(self, instance, node, old_binary=False, options=None, expect_error=False):
|
143 | 145 | if options is None:
|
@@ -325,7 +327,10 @@ def restore_node(
|
325 | 327 | if options is None:
|
326 | 328 | options = []
|
327 | 329 | if node:
|
328 |
| - data_dir = node.data_dir |
| 330 | + if isinstance(node, str): |
| 331 | + data_dir = node |
| 332 | + else: |
| 333 | + data_dir = node.data_dir |
329 | 334 | elif restore_dir:
|
330 | 335 | data_dir = self._node_dir(restore_dir)
|
331 | 336 | else:
|
@@ -533,6 +538,7 @@ def show_archive(
|
533 | 538 | break
|
534 | 539 |
|
535 | 540 | if tli > 0:
|
| 541 | + timeline_data = None |
536 | 542 | for timeline in instance_timelines:
|
537 | 543 | if timeline['tli'] == tli:
|
538 | 544 | return timeline
|
@@ -661,7 +667,7 @@ def set_archiving(
|
661 | 667 | archive_command += ' --remote-proto=ssh --remote-host=localhost'
|
662 | 668 |
|
663 | 669 | if init_params.archive_compress and compress:
|
664 |
| - archive_command += ' --compress-algorithm=' + init_params.archive_compress |
| 670 | + archive_command += ' --compress-algorithm='+init_params.archive_compress |
665 | 671 |
|
666 | 672 | if overwrite:
|
667 | 673 | archive_command += ' --overwrite'
|
|
0 commit comments