File fixed-bug-lvm-has-no-parttion-type.-the-scipt-later-.patch of Package salt.16872

From 40a033cecf44d319039337eb4e4d2f14febe400b Mon Sep 17 00:00:00 2001
From: tyl0re <andreas@vogler.name>
Date: Wed, 17 Jul 2019 10:13:09 +0200
Subject: [PATCH] Fixed Bug LVM has no Parttion Type. the Scipt Later
 it is checked if fs_type: cmd = ('parted', '-m', '-s', '--', device,
 'mkpart', part_type, fs_type, start, end) else: cmd = ('parted', '-m', '-s',
 '--', device, 'mkpart', part_type, start, end) But never reached. The Check
 was in earlier Versions with parted.py 443 if fs_type and fs_type not in
 set(['ext2', 'fat32', 'fat16', 'linux-swap', 'reiserfs', 444 'hfs', 'hfs+',
 'hfsx', 'NTFS', 'ufs', 'xfs', 'zfs']):

So the check on not defined fs_type is missing
---
 salt/modules/parted_partition.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/salt/modules/parted_partition.py b/salt/modules/parted_partition.py
index 9441fec49fd1833da590b3f65637e8e92b287d1c..7d08a7b315c990e7a87c9c77fd6550a6174b7160 100644
--- a/salt/modules/parted_partition.py
+++ b/salt/modules/parted_partition.py
@@ -515,7 +515,7 @@ def mkpartfs(device, part_type, fs_type, start, end):
             'Invalid part_type passed to partition.mkpartfs'
         )
 
-    if not _is_fstype(fs_type):
+    if fs_type and not _is_fstype(fs_type):
         raise CommandExecutionError(
             'Invalid fs_type passed to partition.mkpartfs'
         )
-- 
2.23.0


openSUSE Build Service is sponsored by