OSError in ensure_config_dir_exists shouldn't be fatal

Bug #661101 reported by Martin Pool
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned
Breezy
Triaged
Low
Martin Packman

Bug Description

If you run bzr 2.0.4 as a user whose home directory doesn't exist you get-

escudero% bzr -Derror clean-tree
failed to open trace file: [Errno 2] No such file or directory: '/home/bzr-web/.bzr.log'
bzr: ERROR: exceptions.OSError: [Errno 2] No such file or directory: '/home/bzr-web/.bazaar'

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 842, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 1037, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 654, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 5746, in run
    dry_run=dry_run, no_prompt=force)
  File "/usr/lib/python2.5/site-packages/bzrlib/clean_tree.py", line 55, in clean_tree
    ignored=ignored, detritus=detritus))
  File "/usr/lib/python2.5/site-packages/bzrlib/clean_tree.py", line 40, in iter_deletables
    if tree.is_ignored(subp):
  File "/usr/lib/python2.5/site-packages/bzrlib/workingtree.py", line 1748, in is_ignored
    self._ignoreglobster = globbing.Globster(self.get_ignore_list())
  File "/usr/lib/python2.5/site-packages/bzrlib/workingtree.py", line 1723, in get_ignore_list
    ignore_globs.update(ignores.get_user_ignores())
  File "/usr/lib/python2.5/site-packages/bzrlib/ignores.py", line 129, in get_user_ignores
    _set_user_ignores(USER_DEFAULTS)
  File "/usr/lib/python2.5/site-packages/bzrlib/ignores.py", line 151, in _set_user_ignores
    config.ensure_config_dir_exists()
  File "/usr/lib/python2.5/site-packages/bzrlib/config.py", line 772, in ensure_config_dir_exists
    os.mkdir(path)
OSError: [Errno 2] No such file or directory: '/home/bzr-web/.bazaar'

we should cope without it.

Tags: config easy
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
Changed in brz:
status: New → Fix Released
status: Fix Released → Triaged
importance: Undecided → Low
assignee: nobody → Martin Packman (gz)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.