mirror of
https://github.com/certbot/certbot.git
synced 2026-07-27 16:19:11 +02:00
Pick up the augeas RuntimeError and pass the correct one
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user