Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Skip adding FSService to the runtime if it is not defined.
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Daly committed Mar 30, 2015
1 parent b4d8e81 commit 598dedc
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions workbench/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,14 +239,15 @@ class WorkbenchRuntime(Runtime):
def __init__(self, user_id=None):
# TODO: Add params for user, runtime, etc. to service initialization
# Move to stevedor
super(WorkbenchRuntime, self).__init__(
ID_MANAGER,
services={
'fs': xblock.reference.plugins.FSService(),
'field-data': KvsFieldData(WORKBENCH_KVS),
'user': WorkBenchUserService(user_id),
}
)
services={
'field-data': KvsFieldData(WORKBENCH_KVS),
'user': WorkBenchUserService(user_id),
}

if hasattr(xblock.reference.plugins, 'FSService'):
services['fs'] = xblock.reference.plugins.FSService()

super(WorkbenchRuntime, self).__init__(ID_MANAGER, services=services)
self.id_generator = ID_MANAGER
self.user_id = user_id

Expand Down

0 comments on commit 598dedc

Please sign in to comment.