From d4379820f52d650f3dbc4d89271bd2a5f4521aeb Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Wed, 17 Apr 2019 17:16:17 +0200 Subject: [PATCH] replace old-school % with format() --- sfa/planetlab/plshell.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/sfa/planetlab/plshell.py b/sfa/planetlab/plshell.py index f544f7a7..e668317e 100644 --- a/sfa/planetlab/plshell.py +++ b/sfa/planetlab/plshell.py @@ -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 -- 2.47.0