[gnome-builder] Ide: cleanup



commit 18f62db1ab9dc61832561a3233cd23c8a7769a06
Author: Christian Hergert <chergert redhat com>
Date:   Fri Jun 9 01:36:34 2017 -0700

    Ide: cleanup
    
    Whitespace cleanup and move assignments near their use.

 libide/Ide.py |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/libide/Ide.py b/libide/Ide.py
index ed1e9aa..9d79127 100644
--- a/libide/Ide.py
+++ b/libide/Ide.py
@@ -62,6 +62,8 @@ def DBusMethod(dbus_interface, in_signature=None, out_signature=None, async=Fals
         return func
     return decorator
 
+Ide.DBusMethod = DBusMethod
+
 class DBusService:
     class _DBusInfo:
         object_path = None
@@ -132,7 +134,7 @@ class DBusService:
         try:
             info = self.__dbus_info.methods[iface_name][method_name]
         except KeyError:
-            invocation.return_error_literal(Gio.dbus_error_quark(), 
+            invocation.return_error_literal(Gio.dbus_error_quark(),
                                             Gio.DBusError.UNKNOWN_METHOD,
                                             'No such interface or method: %s.%s' % (iface_name, method_name))
             return
@@ -145,7 +147,7 @@ class DBusService:
                 ret = func(*parameters.unpack())
                 invocation.return_value(GLib.Variant('(' + info['out_signature'] + ')', (ret,)))
         except Exception as e:
-            invocation.return_error_literal(Gio.dbus_error_quark(), 
+            invocation.return_error_literal(Gio.dbus_error_quark(),
                                             Gio.DBusError.IO_ERROR,
                                             'Method %s.%s failed with: %s' % (iface_name, method_name, 
str(e)))
 
@@ -157,12 +159,12 @@ class DBusService:
         error = GLib.Error.new_literal(GLib.io_channel_error_quark(), 1, 'Not implemented yet')
         return False
 
+Ide.DBusService = DBusService
+
 def NotSupportedError():
     return GLib.Error.new_literal(Gio.io_error_quark(), 'not supported', Gio.IOErrorEnum.NOT_SUPPORTED)
 
 Ide.NotSupportedError = NotSupportedError
-Ide.DBusService = DBusService
-Ide.DBusMethod = DBusMethod
 
 #
 # GLib logging wrappers


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]