summaryrefslogtreecommitdiff
path: root/src/migration-scripts/qos
diff options
context:
space:
mode:
Diffstat (limited to 'src/migration-scripts/qos')
-rwxr-xr-xsrc/migration-scripts/qos/1-to-24
1 files changed, 2 insertions, 2 deletions
diff --git a/src/migration-scripts/qos/1-to-2 b/src/migration-scripts/qos/1-to-2
index 14d3a6e0a..cca32d06e 100755
--- a/src/migration-scripts/qos/1-to-2
+++ b/src/migration-scripts/qos/1-to-2
@@ -18,7 +18,7 @@ from sys import argv,exit
from vyos.base import Warning
from vyos.configtree import ConfigTree
-from vyos.util import read_file
+from vyos.utils.file import read_file
def bandwidth_percent_to_val(interface, percent) -> int:
speed = read_file(f'/sys/class/net/{interface}/speed')
@@ -28,7 +28,7 @@ def bandwidth_percent_to_val(interface, percent) -> int:
speed = int(speed) *1000000 # convert to MBit/s
return speed * int(percent) // 100 # integer division
-if (len(argv) < 1):
+if len(argv) < 2:
print("Must specify file name!")
exit(1)