mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
tools/update-authors-json: Avoid shelling out for cp.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
committed by
Tim Abbott
parent
6a8f0165ee
commit
8698198452
@@ -12,11 +12,11 @@ from typing import Any, Dict, List, Optional, Union, cast
|
|||||||
from mypy_extensions import TypedDict
|
from mypy_extensions import TypedDict
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
import argparse
|
import argparse
|
||||||
from time import sleep
|
from time import sleep
|
||||||
from datetime import date
|
from datetime import date
|
||||||
import subprocess
|
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
import json
|
import json
|
||||||
@@ -147,7 +147,7 @@ def copy_fixture() -> None:
|
|||||||
Copy test fixture file from zerver/tests/fixtures. This is used to avoid
|
Copy test fixture file from zerver/tests/fixtures. This is used to avoid
|
||||||
constantly fetching data from Github during testing.
|
constantly fetching data from Github during testing.
|
||||||
"""
|
"""
|
||||||
subprocess.check_call(['cp', FIXTURE_FILE, settings.CONTRIBUTORS_DATA])
|
shutil.copyfile(FIXTURE_FILE, settings.CONTRIBUTORS_DATA)
|
||||||
|
|
||||||
|
|
||||||
if args.use_fixture:
|
if args.use_fixture:
|
||||||
|
|||||||
Reference in New Issue
Block a user