From 981707c112aea3d12c4b0140e6e4510931c177f6 Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Tue, 17 Aug 2010 15:25:19 +0000 Subject: Print warnings about the deprecated activity.info fields --- 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') -- cgit v0.9.1