Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit52fc537

Browse files
committed
Rewrite the conditional processing of backup_prefix
1 parent4d3dd70 commit52fc537

File tree

1 file changed

+3
-6
lines changed
  • testgres/plugins/pg_probackup2/pg_probackup2/storage

1 file changed

+3
-6
lines changed

‎testgres/plugins/pg_probackup2/pg_probackup2/storage/fs_backup.py‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,9 @@ class FSTestBackupDir(TestBackupDir):
4444

4545
def__init__(self,*,rel_path,backup):
4646
backup_prefix=os.environ.get('PG_PROBACKUP_TEST_BACKUP_DIR_PREFIX')
47-
ifbackup_prefix:
48-
ifnotos.path.isabs(backup_prefix):
49-
raiseException(f"PG_PROBACKUP_TEST_BACKUP_DIR_PREFIX must be an absolute path, current value:{backup_prefix}")
50-
self.path=os.path.join(backup_prefix,rel_path,backup)
51-
else:
52-
self.path=os.path.join(init_params.tmp_path,rel_path,backup)
47+
ifnotos.path.isabs(backup_prefix):
48+
raiseException(f"PG_PROBACKUP_TEST_BACKUP_DIR_PREFIX must be an absolute path, current value:{backup_prefix}")
49+
self.path=os.path.join(backup_prefixorinit_params.tmp_path,rel_path,backup)
5350
self.pb_args= ('-B',self.path)
5451

5552
deflist_instance_backups(self,instance):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp