[sugar] [PATCH] Don't rely on dbus importing the exceptions module - import it explicitly.

Dan Williams dcbw at redhat.com
Tue May 22 12:24:55 EDT 2007


On Mon, 2007-05-21 at 12:26 +0100, Simon McVittie wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Also divide up imports in a PEP8-compliant way.

Sure.

> - ---
>  sugar/presence/presenceservice.py |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
> 
> diff --git a/sugar/presence/presenceservice.py b/sugar/presence/presenceservice.py
> index fc9d13e..9d435e7 100644
> - --- a/sugar/presence/presenceservice.py
> +++ b/sugar/presence/presenceservice.py
> @@ -16,9 +16,13 @@
>  # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
>  # Boston, MA 02111-1307, USA.
>  
> - -import dbus, dbus.glib, gobject
>  import logging
>  
> +import dbus
> +import dbus.exceptions
> +import dbus.glib
> +import gobject
> +
>  # XXX use absolute imports
>  #   from sugar.presence import buddy, activity
>  # this *kind* of relative import is deprecated
> - -- 
> 1.5.2-rc3.GIT
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: OpenPGP key: http://www.pseudorandom.co.uk/2003/contact/ or pgp.net
> 
> iD8DBQFGUYHjWSc8zVUw7HYRAuMuAJ4lNTm4hJee/B/lX1VmuVwrWHN2sACglOci
> 0rCtrvYnyhRiNLFY9LSpsoA=
> =Gjam
> -----END PGP SIGNATURE-----
> _______________________________________________
> Sugar mailing list
> Sugar at laptop.org
> http://mailman.laptop.org/mailman/listinfo/sugar



More information about the Sugar mailing list