This commit is contained in:
Brad Warren 2021-07-12 14:08:19 -07:00
parent 3facdafcc6
commit 1b916220e8
2 changed files with 9 additions and 5 deletions

View file

@ -944,10 +944,14 @@ import traceback
def function_wrapper(aug, name, *args, **kwargs):
#if aug.match('//error'):
#import ipdb; ipdb.set_trace()
if aug.match('//error'):
import ipdb; ipdb.set_trace()
#traceback.print_stack()
print('Called', name, 'with', *args, **kwargs)
if name == 'remove':
augtool_name = 'rm'
else:
augtool_name = name
print(augtool_name, *args, **kwargs)
return getattr(aug, name)(*args, **kwargs)
@ -968,7 +972,7 @@ def init_augeas() -> Augeas:
a = Augeas(
# specify a directory to load our preferred lens from
loadpath=constants.AUGEAS_LENS_DIR,
#loadpath=constants.AUGEAS_LENS_DIR,
# Do not save backup (we do it ourselves), do not load
# anything by default
flags=(Augeas.NONE |

View file

@ -90,7 +90,7 @@ class BasicParserTest(util.ParserTest):
def test_add_dir_beginning(self):
aug_default = "/files" + self.parser.loc["default"]
import ipdb; ipdb.set_trace()
#import ipdb; ipdb.set_trace()
self.parser.add_dir_beginning(aug_default,
"AddDirectiveBeginning",
"testBegin")