Skip to content

Commit

Permalink
More python3 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Smith committed Oct 17, 2019
1 parent 762a1cd commit 0db0c02
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions applications/multisite/intersite.py
Original file line number Diff line number Diff line change
Expand Up @@ -1637,9 +1637,9 @@ def do_show(self, keyword):
current_level = 'VERBOSE'
elif current_level == 'WARNING':
current_level = 'WARNINGS'
print('Debug level currently set to:', current_level)
print('Debug level currently set to: ' + current_level)
elif keyword == 'configfile':
print('Configuration file is set to:', self.collector.config_filename)
print('Configuration file is set to: ' + self.collector.config_filename)
elif keyword == 'config':
print json.dumps(self.collector.config.get_config(), indent=4, separators=(',', ':'))
elif keyword == 'log':
Expand All @@ -1655,8 +1655,8 @@ def do_show(self, keyword):
print site.name, ':', state
elif keyword == 'stats':
handler = self.collector.get_local_site().monitor._endpoints
print('Endpoint addition events:', handler.endpoint_add_events)
print('Endpoint deletion events:', handler.endpoint_del_events)
print('Endpoint addition events: ' + str(handler.endpoint_add_events))
print('Endpoint deletion events: ' + str(handler.endpoint_del_events))

def emptyline(self):
"""
Expand Down Expand Up @@ -1697,7 +1697,7 @@ def do_configfile(self, filename):
'''
if len(filename):
self.collector.config_filename = filename
print('Configuration file is set to:', self.collector.config_filename)
print('Configuration file is set to: ' + self.collector.config_filename)
else:
print('No config filename given.')

Expand Down Expand Up @@ -1741,7 +1741,7 @@ def do_debug(self, keyword):
elif keyword == 'critical':
level = logging.CRITICAL
else:
print('Unknown debug level. Valid values are:', self.DEBUG_CMDS[:])
print('Unknown debug level. Valid values are: ' + str(self.DEBUG_CMDS[:]))
return
logging.getLogger().setLevel(level)
level_name = logging.getLevelName(logging.getLogger().getEffectiveLevel())
Expand All @@ -1751,7 +1751,7 @@ def do_debug(self, keyword):
level_name = 'warnings'
elif level_name == 'CRITICAL':
level_name = 'critical'
print('Debug level currently set to:', level_name)
print('Debug level currently set to: ' + level_name)

def complete_debug(self, text, line, begidx, endidx):
"""
Expand Down
8 changes: 4 additions & 4 deletions applications/multisite/intersite_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3596,13 +3596,13 @@ def test_show_debug(self):
"""
Test show debug command
"""
self._test_show_cmd('debug', ['Debug level currently set to:', ' ', 'CRITICAL', '\n'])
self._test_show_cmd('debug', ['Debug level currently set to: CRITICAL', '\n'])

def test_show_configfile(self):
"""
Test show configfile command
"""
self._test_show_cmd('configfile', ['Configuration file is set to:', ' ', 'testsuite_cfg.json', '\n'])
self._test_show_cmd('configfile', ['Configuration file is set to: testsuite_cfg.json', '\n'])

def test_show_config(self):
"""
Expand All @@ -3621,8 +3621,8 @@ def test_show_stats(self):
"""
Test show stats command
"""
self._test_show_cmd('stats', ['Endpoint addition events:', ' ', '0', '\n',
'Endpoint deletion events:', ' ', '0', '\n'])
self._test_show_cmd('stats', ['Endpoint addition events: 0', '\n',
'Endpoint deletion events: 0', '\n'])


def main_test():
Expand Down

0 comments on commit 0db0c02

Please sign in to comment.