getPort doesn't work if the config file does not exist

Bug #505418 reported by Thomas Vander Stichele
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
desktopcouch
Confirmed
Low
Ubuntu One Client Engineering team

Bug Description

I had deleted all desktopcouch files to start fresh and test (.config, .local/share, .cache)

When calling dbus getPort, I get:

[thomas@ana ~]$ dbus-send --session --dest=org.desktopcouch.CouchDB --print-reply --type=method_call / org.desktopcouch.CouchDB.getPort
Error org.freedesktop.DBus.Python.IOError: Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/dbus/service.py", line 702, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/desktopcouch/desktopcouch-service", line 63, in getPort
    return int(desktopcouch.find_port())
  File "/usr/lib/python2.6/site-packages/desktopcouch/__init__.py", line 40, in find_port__linux
    pid = find_pid()
  File "/usr/lib/python2.6/site-packages/desktopcouch/__init__.py", line 29, in find_pid
    pid = start_local_couchdb.start_couchdb()
  File "/usr/lib/python2.6/site-packages/desktopcouch/start_local_couchdb.py", line 300, in start_couchdb
    username, password = create_ini_file()
  File "/usr/lib/python2.6/site-packages/desktopcouch/start_local_couchdb.py", line 119, in create_ini_file
    dump_ini(local, local_files.FILE_INI)
  File "/usr/lib/python2.6/site-packages/desktopcouch/start_local_couchdb.py", line 49, in dump_ini
    fd = open(filename, 'w')
IOError: [Errno 2] No such file or directory: '/home/thomas/.config/desktop-couch/desktop-couchdb.ini'

I would expect it to recreate the directory (desktop-couch) which I assume is why it is failing.

Tags: desktop+
tags: added: desktop+
Changed in desktopcouch:
assignee: nobody → Ubuntu One Desktop+ team (uone-desktop)
status: New → Confirmed
importance: Undecided → Low
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.