On Wed, Nov 02, 2005 at 01:10:30AM -0600, Bob Tanner said
> Did some more debugging
> 
> bzr-0.6/bzrlib/trace.py
> 
> def open_tracefile(tracefilename='~/.bzr.log'):
> 
>         print "before codecs.open", trace_fname
>         tf = codecs.open(trace_fname, 'at', 'utf8', buffering=1)
>         print "after codecs.open"
> 
> before codecs.open /home/tanner/.bzr.log
> No handlers could be found for logger "bzr"
> Traceback (most recent call last):
>   File "./bzr", line 63, in ?
>     bzrlib.trace.enable_default_logging()
>   File "/tmp/bzr-0.6/bzrlib/trace.py", line 211, in enable_default_logging
>     _file_handler.setLevel(level)
> AttributeError: 'NoneType' object has no attribute 'setLevel'
> 
> The tf = codecs.open(trace_fname, 'at', 'utf8', buffering=1) is throwing an 
> exception! 
> 
> In pbuilder-sarge, ~/.bzr.log, expands to  /home/tanner/.bzr.log, but that 
> doesn't exist.
> 
> Demo with interactive python
> 
> # python2.4
> Python 2.4.1 (#2, May  5 2005, 11:32:06)
> [GCC 3.3.5 (Debian 1:3.3.5-12)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import codecs
> >>> tf = codecs.open('/home/tanner/bzr.log', 'at', 'utf8', buffering=1)
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/usr/lib/python2.4/codecs.py", line 607, in open
>     file = __builtin__.open(filename, mode, buffering)
> IOError: [Errno 2] No such file or directory: '/home/tanner/bzr.log'
> 
> Not sure why this exception isn't being caught nor why this work under 
> pbuilder running sid.
> 
> To test I did the following.
> 
>     trace_fname = os.path.join(os.path.expanduser(tracefilename))
> 
> to
> 
>     trace_fname = os.path.join(os.path.expanduser('/var/tmp/bzr.log'))
> 
> Bingo! Ran 488 tests in 21.470s

Ah, great, so setting HOME should fix it.  Thanks for looking into this.

-rob
-- 
Yeaaaaaaaaaaaaaah, the hammer game!  Kill it, kill it, make it dead, whack it!


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to