From 95550c25828891a5de6ff7c2ac295f20cdc7e915 Mon Sep 17 00:00:00 2001 From: Mike Maraya Date: Mon, 30 Jun 2014 22:17:52 -0400 Subject: [PATCH] test.py: Check if camera_calibration.tar.gz file exists before downloading it, opencv bug #3782 --- modules/python/test/test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/python/test/test.py b/modules/python/test/test.py index 10f32260b..c9e7c6d69 100755 --- a/modules/python/test/test.py +++ b/modules/python/test/test.py @@ -1646,7 +1646,8 @@ class AreaTests(OpenCVTests): cv.SetData(imagefiledata, filedata, len(filedata)) return cv.DecodeImageM(imagefiledata) - urllib.urlretrieve("http://docs.opencv.org/data/camera_calibration.tar.gz", "camera_calibration.tar.gz") + if (not os.path.isfile("camera_calibration.tar.gz")): + urllib.urlretrieve("http://docs.opencv.org/data/camera_calibration.tar.gz", "camera_calibration.tar.gz") tf = tarfile.open("camera_calibration.tar.gz") num_x_ints = 8