replace old-school % with format()
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 17 Apr 2019 15:16:17 +0000 (17:16 +0200)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 17 Apr 2019 15:16:17 +0000 (17:16 +0200)
sfa/planetlab/plshell.py

index f544f7a..e668317 100644 (file)
@@ -105,9 +105,18 @@ class PlShell:
                 actual_name = PlShell.alias_calls[name]
             if not actual_name:
                 raise Exception(
-                    "Illegal method call %s for PL driver" % (name))
+                    "Illegal method call {} for PL driver".format(name))
+#            logger.info("__getattr__ {} *={} **={}"
+#                        .format(actual_name, args, kwds))
+#            try:
+#                hrn = args[0]['hrn']
+#                logger.info("getattr/hrn >{}< has len={})"
+#                            .format(hrn, len(hrn)))
+#            except Exception as exc:
+#                pass
             result = getattr(self.proxy, actual_name)(
                 self.plauth, *args, **kwds)
-            logger.debug('PlShell %s (%s) returned ... ' % (name, actual_name))
+            logger.debug('PlShell {} ({}) returned -> {}'
+                         .format(name, actual_name, result))
             return result
         return func