mirror of
https://github.com/certbot/certbot.git
synced 2026-06-08 00:02:14 -04:00
Pick up the augeas RuntimeError and pass the correct one
This commit is contained in:
parent
99c575f043
commit
30ad7dce9f
1 changed files with 5 additions and 2 deletions
|
|
@ -180,8 +180,11 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
|
|||
regexp matching"""
|
||||
|
||||
self.aug.set("/test/path/testing/arg", "aRgUMeNT")
|
||||
matches = self.aug.match(
|
||||
"/test//*[self::arg=~regexp('argument', 'i')]")
|
||||
try:
|
||||
matches = self.aug.match(
|
||||
"/test//*[self::arg=~regexp('argument', 'i')]")
|
||||
except RuntimeError:
|
||||
return None
|
||||
self.aug.remove("/test/path")
|
||||
return matches
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue