From: Evan Shelhamer Date: Thu, 6 Aug 2015 20:04:15 +0000 (-0700) Subject: [pytest] open exception file with mode for python3 X-Git-Tag: submit/tizen/20180823.020014~425^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1934feec285c901066ef28567ccc6a7cb5b4ce92;p=platform%2Fupstream%2Fcaffeonacl.git [pytest] open exception file with mode for python3 --- diff --git a/python/caffe/test/test_python_layer.py b/python/caffe/test/test_python_layer.py index ff070a3..a1e11bc 100644 --- a/python/caffe/test/test_python_layer.py +++ b/python/caffe/test/test_python_layer.py @@ -43,7 +43,7 @@ def python_net_file(): def exception_net_file(): - with tempfile.NamedTemporaryFile(delete=False) as f: + with tempfile.NamedTemporaryFile(mode='w+', delete=False) as f: f.write("""name: 'pythonnet' force_backward: true input: 'data' input_shape { dim: 10 dim: 9 dim: 8 } layer { type: 'Python' name: 'layer' bottom: 'data' top: 'top'