[Sugar-devel] [PATCH sugar-toolkit-gtk3] ActivityBundle: clean from deprecated code

Gonzalo Odiard gonzalo at laptop.org
Wed Jan 18 15:24:19 EST 2012


Reviewed-by: Gonzalo Odiard <gonzalo at laptop.org>

On Wed, Jan 11, 2012 at 1:43 PM, Simon Schampijer <simon at schampijer.de>wrote:

> - removed deprecated mime type 'application/vnd.olpc-x-sugar'
> - activity.info file: removed deprecated field 'service_name' use
> 'bundle_id' instead
> -  activity.info file: removed deprecated field 'class' use 'exec' instead
>
> Signed-off-by: Simon Schampijer <simon at laptop.org>
> ---
>  src/sugar3/bundle/activitybundle.py |   13 +------------
>  1 files changed, 1 insertions(+), 12 deletions(-)
>
> diff --git a/src/sugar3/bundle/activitybundle.py
> b/src/sugar3/bundle/activitybundle.py
> index 206c4fb..2313f41 100644
> --- a/src/sugar3/bundle/activitybundle.py
> +++ b/src/sugar3/bundle/activitybundle.py
> @@ -43,7 +43,6 @@ class ActivityBundle(Bundle):
>     """
>
>     MIME_TYPE = 'application/vnd.olpc-sugar'
> -    DEPRECATED_MIME_TYPE = 'application/vnd.olpc-x-sugar'
>
>     _zipped_extension = '.xo'
>     _unzipped_extension = '.activity'
> @@ -84,11 +83,6 @@ class ActivityBundle(Bundle):
>
>         if cp.has_option(section, 'bundle_id'):
>             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(
>                 'Activity bundle %s does not specify a bundle id' %
> @@ -100,12 +94,7 @@ class ActivityBundle(Bundle):
>             raise MalformedBundleException(
>                 'Activity bundle %s does not specify a name' % self._path)
>
> -        # 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'):
> +        if cp.has_option(section, 'exec'):
>             self.bundle_exec = cp.get(section, 'exec')
>         else:
>             raise MalformedBundleException(
> --
> 1.7.7.5
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20120118/abc372e1/attachment.html>


More information about the Sugar-devel mailing list