gwibber/microblog/util/log.py fails if ~/.cache isn't already present

Bug #571367 reported by Tom "spot" Callaway
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gwibber
Fix Released
Undecided
Unassigned

Bug Description

With a brand new user on a Fedora 12 system, gwibber fails to start:

Traceback (most recent call last):
  File "/usr/bin/gwibber", line 47, in <module>
    from gwibber.microblog.util import log
  File "/usr/lib/python2.6/site-packages/gwibber/microblog/util/__init__.py",
line 3, in <module>
    import log
  File "/usr/lib/python2.6/site-packages/gwibber/microblog/util/log.py", line
9, in <module>
    mkdir(cache_dir)
OSError: [Errno 2] No such file or directory: '/home/test/.cache/gwibber'

The reason is this:

 cache_dir = realpath(join(xdg.BaseDirectory.xdg_cache_home, "gwibber"))
 if not isdir(cache_dir):
  mkdir(cache_dir)

The problem here is that this python code is trying to do the equivalent of:

# mkdir ~/.cache/gwibber

...when ~/.cache/ doesn't exist. You'd want to run mkdir -p in that instance,
which is os.makedirs() in python.

Attached is a patch which resolves this issue.

Related branches

Revision history for this message
Tom "spot" Callaway (tcallawa) wrote :
Revision history for this message
Omer Akram (om26er) wrote :

marking fixed since there is a branch linked that was merged.

Changed in gwibber:
status: New → Fix Released
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.