Skip to content

Commit b9df05c

Browse files
authored
Handle permission error for download destination (#919)
* Handle permission error for download destination * Fix wget tests
1 parent 90d7249 commit b9df05c

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

lib/pavilion/test_run/test_run.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,11 @@ def _make_builder(self) -> builder.TestBuilder:
351351
download_dest = self.suite_path
352352

353353
# Check the deprecated directory
354-
if not download_dest.exists() or not download_dest.is_dir():
355-
download_dest = self.suite_path.parents[1] / 'test_src'
354+
try:
355+
if not download_dest.exists() or not download_dest.is_dir():
356+
download_dest = self.suite_path.parents[1] / 'test_src'
357+
except PermissionError:
358+
download_dest = None
356359
else:
357360
download_dest = None
358361

test/tests/wget_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
class TestWGet(PavTestCase):
1717

18-
GET_TARGET = "https://github.com/lanl/Pavilion/raw/master/README.md"
19-
TARGET_HASH = '275fa3c8aeb10d145754388446be1f24bb16fb00'
18+
GET_TARGET = "https://raw.githubusercontent.com/hpc/pavilion2/bf3c9d6e84eb844cb2b2992ed7e34a11619e8ce6/README.md"
19+
TARGET_HASH = "e5bf8b0b446db298fbf411342c5f78dca821a742"
2020

2121
_logger = logging.getLogger(__file__)
2222

0 commit comments

Comments
 (0)