Skip to content

Commit

Permalink
Workaround to enable start of activities still using service_name
Browse files Browse the repository at this point in the history
While we deprecated service_name a long time ago, still there are activities
using it, and is a source of frequent problems.

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
  • Loading branch information
godiard authored and Manuel Quiñones committed Oct 31, 2013
1 parent cf39273 commit 32f97b4
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/sugar3/bundle/activitybundle.py
Expand Up @@ -128,9 +128,15 @@ def _parse_info(self, info_file):
if cp.has_option(section, 'bundle_id'):
self._bundle_id = cp.get(section, 'bundle_id')
else:
raise MalformedBundleException(
'Activity bundle %s does not specify a bundle id' %
self._path)
if cp.has_option(section, 'service_name'):
self._bundle_id = cp.get(section, 'service_name')
logging.error('ATTENTION: service_name property in the '
'activity.info file is deprecated, should be '
' changed to bundle_id')
else:
raise MalformedBundleException(
'Activity bundle %s does not specify a bundle id' %
self._path)

if cp.has_option(section, 'name'):
self._name = cp.get(section, 'name')
Expand Down

0 comments on commit 32f97b4

Please sign in to comment.