From 50bc071db15b09395dc516f8fc85c6c6c59f8da5 Mon Sep 17 00:00:00 2001 From: Herbert Wolverson Date: Fri, 26 Jan 2024 16:33:26 -0600 Subject: [PATCH] Fix issue with queueRefreshInterval being optional but not treated as such, and breaking things. --- src/rust/lqos_config/src/etc/python_migration.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rust/lqos_config/src/etc/python_migration.rs b/src/rust/lqos_config/src/etc/python_migration.rs index 4751f52c..c1077f55 100644 --- a/src/rust/lqos_config/src/etc/python_migration.rs +++ b/src/rust/lqos_config/src/etc/python_migration.rs @@ -108,7 +108,7 @@ impl PythonMigration { cfg.generated_pn_upload_mbps = from_python(&py, "generatedPNUploadMbps")?; cfg.interface_a = from_python(&py, "interfaceA")?; cfg.interface_b = from_python(&py, "interfaceB")?; - cfg.queue_refresh_interval_mins = from_python(&py, "queueRefreshIntervalMins")?; + cfg.queue_refresh_interval_mins = from_python(&py, "queueRefreshIntervalMins").unwrap_or(15); cfg.on_a_stick = from_python(&py, "OnAStick")?; cfg.stick_vlan_a = from_python(&py, "StickVlanA")?; cfg.stick_vlan_b = from_python(&py, "StickVlanB")?; @@ -173,6 +173,7 @@ impl PythonMigration { Ok(old_config) } + #[allow(dead_code)] pub(crate) fn load_from_string(s: &str) -> Result { let mut old_config = Self::default(); prepare_freethreaded_python();