Bug #1671

bash_completion: an exception is displayed when ~/.config can not be created

Added by Pierre-Louis Bonicoli about 3 years ago. Updated almost 3 years ago.

Status:Resolved Start:2014-11-18
Priority:Normal Due date:
Assigned to:- % Done:


Category:Misc Spent time: -
Target version:1.1
Module: Branch:


An exception is displayed by weboob_bash_completion when ~/.config directory can not be created:

$ su - nobody -s /bin/bash

The exception shouldn't be displayed.

The exception is:

Traceback (most recent call last):
  File "/usr/bin/weboob-config", line 27, in <module>
  File "/usr/lib/python2.7/dist-packages/weboob/tools/application/console.py", line 198, in run
    super(ConsoleApplication, klass).run(args)
  File "/usr/lib/python2.7/dist-packages/weboob/tools/application/base.py", line 458, in run
    app = cls()
  File "/usr/lib/python2.7/dist-packages/weboob/tools/application/repl.py", line 115, in __init__
    ConsoleApplication.__init__(self, ReplOptionParser(self.SYNOPSIS, version=self._get_optparse_version()))
  File "/usr/lib/python2.7/dist-packages/weboob/tools/application/console.py", line 77, in __init__
    Application.__init__(self, option_parser)
  File "/usr/lib/python2.7/dist-packages/weboob/tools/application/base.py", line 147, in __init__
    self.weboob = self.create_weboob()
  File "/usr/lib/python2.7/dist-packages/weboob/tools/application/base.py", line 112, in create_weboob
    return Weboob()
  File "/usr/lib/python2.7/dist-packages/weboob/core/ouiboube.py", line 347, in __init__
  File "/usr/lib/python2.7/dist-packages/weboob/core/ouiboube.py", line 362, in _create_dir
  File "/usr/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/.config'

Associated revisions

Revision 88faf18aa3be08dd8ff4349834a03f45865005c3
Added by Pierre-Louis Bonicoli about 3 years ago

bash completion: hide errors (closes #1671)

For system installation, the bash auto-completion will display messages
for users without home directory. Redirect stderr to null


Updated by Pierre-Louis Bonicoli about 3 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Updated by Romain Bignon almost 3 years ago

  • Target version set to 1.1

Also available in: Atom PDF