Skip to content
Browse files
Enable local filepaths for testing.
If the template_url is actually an absolute path, then read the
template from there. This provides for testing local changes to the
templates without having to commit them. (normally, svnauthz always
reads committed templates from
  • Loading branch information
gstein committed Apr 15, 2021
1 parent ec79aa7 commit 0b562f8200a8d18f8f595af7bb292d798611f037
Showing 1 changed file with 6 additions and 2 deletions.
@@ -108,8 +108,12 @@ def write_files(self):
if self.debug:
print('WRITE_FILES: beginning at', t0)
for t, o in self.mappings.items():
template = requests.get(t, auth=self.auth, timeout=30)
self.gen.write_file(template.text.splitlines(), o)
if t.startswith('/'):
# File path. Just read it.
template = open(t).read()
template = requests.get(t, auth=self.auth, timeout=30).text
self.gen.write_file(template.splitlines(), o)
if self.debug:
print(f' DURATION: {time.time() - t0}')

0 comments on commit 0b562f8

Please sign in to comment.