From 1683b7dbd84ce4bdc399d3da731c9c5b22ed07fe Mon Sep 17 00:00:00 2001
From: xuezhixin <xuezhixin@uniontech.com>
Date: Fri, 10 Nov 2023 14:33:19 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E7=B3=BB=E7=BB=9F=E7=89=88?=
 =?UTF-8?q?=E6=9C=AC=E5=92=8C=E7=B3=BB=E7=BB=9F=E5=90=8D=E7=A7=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 sysmig_agent/migration.py | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/sysmig_agent/migration.py b/sysmig_agent/migration.py
index ebee24d..fec143a 100644
--- a/sysmig_agent/migration.py
+++ b/sysmig_agent/migration.py
@@ -221,3 +221,17 @@ def get_old_osnameversion():
             return str(state)
     except:
         return None
+
+
+def get_old_osname():
+    nv = get_old_osnameversion()
+    oldosname = re.sub(r'[0-9]', '', nv)
+    return oldosname
+
+
+def get_old_osversion():
+    nv = get_old_osnameversion()
+    oldosversion = re.sub(r'[A-Z,a-z]', '', nv)
+    return oldosversion
+
+
-- 
2.20.1

