Skip to content

Commit d58015f

Browse files
author
Zhen Li
committed
Fix the windows red build by removing the known_host backup all the time
1 parent e350d2d commit d58015f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/util.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121

2222
import functools
23-
from os import rename
23+
from os import remove, rename
2424
from os.path import isfile
2525
from unittest import TestCase
2626

@@ -57,8 +57,12 @@ class ServerTestCase(TestCase):
5757

5858
def setUp(self):
5959
if isfile(self.known_hosts):
60+
if isfile(self.known_hosts_backup):
61+
remove(self.known_hosts_backup)
6062
rename(self.known_hosts, self.known_hosts_backup)
6163

6264
def tearDown(self):
6365
if isfile(self.known_hosts_backup):
66+
if isfile(self.known_hosts):
67+
remove(self.known_hosts)
6468
rename(self.known_hosts_backup, self.known_hosts)

0 commit comments

Comments
 (0)