aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2017-06-15 12:19:24 +0000
committerSander Vrijders <sander.vrijders@intec.ugent.be>2017-06-15 12:19:24 +0000
commita3d683dd972ee780f790760d22a6073843c5b65d (patch)
treea0cfc44b5a0c728af9d5e39e84b0158a00d1601c
parent84978da12c1d857aaa8e64129d634ebd5270f100 (diff)
parentd2744740a682701d3f1f714c15fe4265f4e7a495 (diff)
downloadrumba-a3d683dd972ee780f790760d22a6073843c5b65d.tar.gz
rumba-a3d683dd972ee780f790760d22a6073843c5b65d.zip
Merge branch '14-__init__-got-an-unexpected-keyword-argument-style' into 'master'
Resolve "__init__() got an unexpected keyword argument 'style'" Closes #14 See merge request !58
-rw-r--r--rumba/log.py15
-rw-r--r--rumba/ssh_support.py2
2 files changed, 8 insertions, 9 deletions
diff --git a/rumba/log.py b/rumba/log.py
index d95c034..bed0170 100644
--- a/rumba/log.py
+++ b/rumba/log.py
@@ -40,9 +40,8 @@ class RumbaFormatter(logging.Formatter):
def __init__(self):
super(RumbaFormatter, self).__init__(
- fmt='{asctime} | {levelname:3.3} | '
- '{name:11.11} | {message}',
- style='{',
+ fmt='%(asctime)s | %(levelname)3.3s | '
+ '%(name)11.11s | %(message)s',
datefmt='%H:%M:%S')
def format(self, record):
@@ -95,11 +94,11 @@ def set_logging_level(level, name=None):
"""
Set the current logging level to <level> for logger named <name>.
If name is not specified, sets the logging level for all rumba loggers.
- Accepted levels are:
- DEBUG == 10,
- INFO == 20,
- WARNING == 30,
- ERROR == 40,
+ Accepted levels are:
+ DEBUG == 10,
+ INFO == 20,
+ WARNING == 30,
+ ERROR == 40,
CRITICAL == 50,
NOTSET == 0
(resets the logger: its level is set to the default or its parents' level)
diff --git a/rumba/ssh_support.py b/rumba/ssh_support.py
index a1e1ba4..b0970e1 100644
--- a/rumba/ssh_support.py
+++ b/rumba/ssh_support.py
@@ -40,7 +40,7 @@ def _print_stream(stream):
o_array = o.split('\\n')
for oi in o_array:
logger.debug(oi)
- return o
+ return o.rstrip()
def execute_proxy_commands(testbed, ssh_config, commands, time_out=3):