From aa7546258e3f24bec3df2d8c4b203ed08e0acbce Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 5 Oct 2009 21:00:34 -0400 Subject: Moved from *.__del__() to exclusive use of *.cleanup(). *.__del__() is run some unspecified time after the refcount for an object is reduced to zero. Sometimes that means that the rest of the world has already been deallocated, which makes life difficult, especially when Python won't attempt to construct stack traces inside *.__del__(). We were always (hopefully ;) calling del(*) anyway, so we just replace those calls with *.cleanup() --- becommands/init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'becommands/init.py') diff --git a/becommands/init.py b/becommands/init.py index 1125d93..a6098ba 100644 --- a/becommands/init.py +++ b/becommands/init.py @@ -32,7 +32,7 @@ def execute(args, manipulate_encodings=True): >>> execute(['--root', dir.path], manipulate_encodings=False) No revision control detected. Directory initialized. - >>> del(dir) + >>> dir.cleanup() >>> dir = utility.Dir() >>> os.chdir(dir.path) -- cgit