Skip to content

Commit 34872c3

Browse files
committed
func to get zypper version
for future use in preload support detection.
1 parent aaf01b3 commit 34872c3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

zypperoni

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,19 @@ from shlex import quote
2929
import xml.etree.ElementTree as ET
3030

3131
# Constants
32-
ZYPPERONI_VERSION = "1.0.8"
32+
ZYPPERONI_VERSION = "1.1.0"
3333
ZYPPER_PID_FILE = "/run/zypp.pid"
3434
ZYPPER_ENV = "ZYPP_CURL2=1 ZYPP_PCK_PRELOAD=1 ZYPP_SINGLE_RPMTRANS=1"
3535

3636
################################
3737

38+
# Function to get zypper version
39+
def zypper_version():
40+
out, ret = shell_exec("zypper --version")
41+
version = out.split()[1].split(".")
42+
version = [int(x) for x in version] # MAJOR.MINOR.PATCH
43+
return version
44+
3845
# Function to get ANSI colored text
3946
def color(text_type, text):
4047
# rgb color codes

0 commit comments

Comments
 (0)