summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-09-03 12:33:32 +0200
committerChristian Poessinger <christian@poessinger.com>2019-09-03 12:33:34 +0200
commit8b2e1f9a9c493b2d04513f83e154c092df66f761 (patch)
tree30e3b84348e3983edcf07a3bbb6cb1e6afe06ecc /python
parent50ea3e0576dd18d98d7696fcbf0714b6fe86672d (diff)
downloadvyos-1x-8b2e1f9a9c493b2d04513f83e154c092df66f761.tar.gz
vyos-1x-8b2e1f9a9c493b2d04513f83e154c092df66f761.zip
Python/ifconfig: T1557: adjust debug message format
* remove missleading " as first character with no closing quote * use single quotes in output messages (unclutter) * when writing changes, make output string copy/pasteable my changing '->' to '>'
Diffstat (limited to 'python')
-rw-r--r--python/vyos/ifconfig.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/vyos/ifconfig.py b/python/vyos/ifconfig.py
index 217f898fa..786753b8c 100644
--- a/python/vyos/ifconfig.py
+++ b/python/vyos/ifconfig.py
@@ -84,7 +84,7 @@ class Interface:
def _debug_msg(self, msg):
if self._debug:
- print('"DEBUG/{}: {}'.format(self._ifname, msg))
+ print('DEBUG/{}: {}'.format(self._ifname, msg))
def remove(self):
@@ -126,7 +126,7 @@ class Interface:
with open(filename, 'r') as f:
value = f.read().rstrip('\n')
- self._debug_msg('read "{}" <- "{}"'.format(value, filename))
+ self._debug_msg("read '{}' < '{}'".format(value, filename))
return value
@@ -134,7 +134,7 @@ class Interface:
"""
Provide a single primitive w/ error checking for writing to sysfs.
"""
- self._debug_msg('write "{}" -> "{}"'.format(value, filename))
+ self._debug_msg("write '{}' > '{}'".format(value, filename))
with open(filename, 'w') as f:
f.write(str(value))