Timeout of 120 seconds for mount to work around jffs2 issues.
This commit is contained in:
parent
79ba6b91b7
commit
c74013db1f
@ -24,6 +24,7 @@ import time
|
|||||||
import gobject
|
import gobject
|
||||||
import gtk
|
import gtk
|
||||||
import wnck
|
import wnck
|
||||||
|
import dbus
|
||||||
|
|
||||||
from sugar.activity.activityhandle import ActivityHandle
|
from sugar.activity.activityhandle import ActivityHandle
|
||||||
from sugar import activity
|
from sugar import activity
|
||||||
@ -38,6 +39,13 @@ from view.keyhandler import KeyHandler
|
|||||||
from view.home.HomeWindow import HomeWindow
|
from view.home.HomeWindow import HomeWindow
|
||||||
from model.shellmodel import ShellModel
|
from model.shellmodel import ShellModel
|
||||||
|
|
||||||
|
# #3903 - this constant can be removed and assumed to be 1 when dbus-python
|
||||||
|
# 0.82.3 is the only version used
|
||||||
|
if dbus.version >= (0, 82, 3):
|
||||||
|
DBUS_PYTHON_TIMEOUT_UNITS_PER_SECOND = 1
|
||||||
|
else:
|
||||||
|
DBUS_PYTHON_TIMEOUT_UNITS_PER_SECOND = 1000
|
||||||
|
|
||||||
class Shell(gobject.GObject):
|
class Shell(gobject.GObject):
|
||||||
def __init__(self, model):
|
def __init__(self, model):
|
||||||
gobject.GObject.__init__(self)
|
gobject.GObject.__init__(self)
|
||||||
@ -69,7 +77,8 @@ class Shell(gobject.GObject):
|
|||||||
|
|
||||||
def _start_journal_idle(self):
|
def _start_journal_idle(self):
|
||||||
# Mount the datastore in internal flash
|
# Mount the datastore in internal flash
|
||||||
datastore.mount(env.get_profile_path('datastore'), [])
|
datastore.mount(env.get_profile_path('datastore'), [],
|
||||||
|
timeout=120 * DBUS_PYTHON_TIMEOUT_UNITS_PER_SECOND)
|
||||||
|
|
||||||
# Checking for the bundle existence will also ensure
|
# Checking for the bundle existence will also ensure
|
||||||
# that the shell service is started up.
|
# that the shell service is started up.
|
||||||
|
@ -291,8 +291,8 @@ def copy(jobject, mount_point):
|
|||||||
|
|
||||||
write(new_jobject)
|
write(new_jobject)
|
||||||
|
|
||||||
def mount(uri, options):
|
def mount(uri, options, timeout=-1):
|
||||||
return dbus_helpers.mount(uri, options)
|
return dbus_helpers.mount(uri, options, timeout=timeout)
|
||||||
|
|
||||||
def unmount(mount_point_id):
|
def unmount(mount_point_id):
|
||||||
dbus_helpers.unmount(mount_point_id)
|
dbus_helpers.unmount(mount_point_id)
|
||||||
|
@ -82,8 +82,8 @@ def find(query, properties, reply_handler, error_handler):
|
|||||||
else:
|
else:
|
||||||
return _get_data_store().find(query, properties)
|
return _get_data_store().find(query, properties)
|
||||||
|
|
||||||
def mount(uri, options):
|
def mount(uri, options, timeout=-1):
|
||||||
return _get_data_store().mount(uri, options)
|
return _get_data_store().mount(uri, options, timeout=timeout)
|
||||||
|
|
||||||
def unmount(mount_point_id):
|
def unmount(mount_point_id):
|
||||||
_get_data_store().unmount(mount_point_id)
|
_get_data_store().unmount(mount_point_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user