Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2010-08-17 15:25:19 (GMT)
committer Simon Schampijer <simon@schampijer.de>2010-08-17 15:25:19 (GMT)
commit981707c112aea3d12c4b0140e6e4510931c177f6 (patch)
treedf081101157dcd7096581ac964ffe71c3a257cd9
parentacd8095a29f2f922acce3e907fb71a6019eff113 (diff)
Print warnings about the deprecated activity.info fields
-rw-r--r--src/sugar/bundle/activitybundle.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sugar/bundle/activitybundle.py b/src/sugar/bundle/activitybundle.py
index c83257f..673db67 100644
--- a/src/sugar/bundle/activitybundle.py
+++ b/src/sugar/bundle/activitybundle.py
@@ -25,6 +25,7 @@ import locale
import os
import tempfile
import logging
+import warnings
from sugar import env
from sugar import util
@@ -151,6 +152,8 @@ class ActivityBundle(Bundle):
self._bundle_id = cp.get(section, 'bundle_id')
# FIXME deprecated
elif cp.has_option(section, 'service_name'):
+ warnings.warn('use bundle_id instead of service_name ' \
+ 'in your activity.info', DeprecationWarning)
self._bundle_id = cp.get(section, 'service_name')
else:
raise MalformedBundleException(
@@ -165,6 +168,8 @@ class ActivityBundle(Bundle):
# FIXME class is deprecated
if cp.has_option(section, 'class'):
+ warnings.warn('use exec instead of class ' \
+ 'in your activity.info', DeprecationWarning)
self.activity_class = cp.get(section, 'class')
elif cp.has_option(section, 'exec'):
self.bundle_exec = cp.get(section, 'exec')