summaryrefslogtreecommitdiff
path: root/src/op_mode/show_ipsec_sa.py
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-12-17 00:37:30 +0700
committerGitHub <noreply@github.com>2018-12-17 00:37:30 +0700
commit5ae0e478b41a5ca2b179f712ac1a71b4d1fca616 (patch)
treeb6221e2ab498c1c5eb142e20d2d9aa781a1cedd4 /src/op_mode/show_ipsec_sa.py
parente734b846ec53f9950da562ea27676f63ac5c1599 (diff)
parent95ff6604198f0c946a1d8d5773dbad63878dc178 (diff)
downloadvyos-1x-5ae0e478b41a5ca2b179f712ac1a71b4d1fca616.tar.gz
vyos-1x-5ae0e478b41a5ca2b179f712ac1a71b4d1fca616.zip
Merge pull request #62 from daniel-pro/T1104
T1104 : "show vpn ipsec sa" crashes
Diffstat (limited to 'src/op_mode/show_ipsec_sa.py')
-rwxr-xr-xsrc/op_mode/show_ipsec_sa.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/op_mode/show_ipsec_sa.py b/src/op_mode/show_ipsec_sa.py
index 3c8d678eb..9e1d6ce4d 100755
--- a/src/op_mode/show_ipsec_sa.py
+++ b/src/op_mode/show_ipsec_sa.py
@@ -42,8 +42,8 @@ for conn in connections:
enc, hash, dh, bytes_in, bytes_out = parse_ike_line(status)
# Convert bytes to human-readable units
- bytes_in = hurry.filesize.size(bytes_in)
- bytes_out = hurry.filesize.size(bytes_out)
+ bytes_in = hurry.filesize.size(int(bytes_in))
+ bytes_out = hurry.filesize.size(int(bytes_out))
status_line = [conn, "up", time, "{0}/{1}".format(bytes_in, bytes_out), ip, id, "{0}/{1}/{2}".format(enc, hash, dh)]
except Exception as e: