Workaround to enable start of activities still using service_name

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>
This commit is contained in:
Gonzalo Odiard 2013-10-30 10:36:33 -03:00 committed by Manuel Quiñones
parent cf392735a0
commit 32f97b48c3

View File

@ -128,9 +128,15 @@ class ActivityBundle(Bundle):
if cp.has_option(section, 'bundle_id'): if cp.has_option(section, 'bundle_id'):
self._bundle_id = cp.get(section, 'bundle_id') self._bundle_id = cp.get(section, 'bundle_id')
else: else:
raise MalformedBundleException( if cp.has_option(section, 'service_name'):
'Activity bundle %s does not specify a bundle id' % self._bundle_id = cp.get(section, 'service_name')
self._path) 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'): if cp.has_option(section, 'name'):
self._name = cp.get(section, 'name') self._name = cp.get(section, 'name')