1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 00:03:28 +01:00

manager: fixes for windows: use shutil.move instead of os.rename to allow move to

existing file
tests: reset workdir before deleting temp dir
This commit is contained in:
Ilya Kreymer 2015-03-18 13:14:05 -07:00
parent 3f084625b0
commit 73f24f5a2b
2 changed files with 5 additions and 4 deletions

View File

@ -145,7 +145,8 @@ directory structure expected by pywb
merged.write(line)
last_line = line
os.rename(merged_file, cdx_file)
shutil.move(merged_file, cdx_file)
#os.rename(merged_file, cdx_file)
os.remove(temp_file)
def set_metadata(self, namevalue_pairs):

View File

@ -37,12 +37,12 @@ def setup_module():
root_dir = os.getcwd()
def teardown_module():
global root_dir
shutil.rmtree(root_dir)
global orig_cwd
os.chdir(orig_cwd)
global root_dir
shutil.rmtree(root_dir)
#=============================================================================
class TestManagedColls(object):