sailesh1993 / rpms / cloud-init

Forked from rpms/cloud-init 10 months ago
Clone
222d62
From f502ab105bca61613a4ff83aa5ea373bc00bb4e9 Mon Sep 17 00:00:00 2001
222d62
From: Eduardo Otubo <otubo@redhat.com>
222d62
Date: Thu, 10 Jan 2019 10:03:14 +0100
222d62
Subject: [PATCH] Fix string missmatch when mounting ntfs
222d62
222d62
RH-Author: Eduardo Otubo <otubo@redhat.com>
222d62
Message-id: <20190110100314.32713-1-otubo@redhat.com>
222d62
Patchwork-id: 83943
222d62
O-Subject: [RHEL-8.0 cloud-init PATCH] Fix string missmatch when mounting ntfs
222d62
Bugzilla: 1664227
222d62
RH-Acked-by: Vitaly Kuznetsov <vkuznets@redhat.com>
222d62
RH-Acked-by: Mohammed Gamal <mgamal@redhat.com>
222d62
222d62
This patch fixes a simple string missmatch when attempting to mount ntfs
222d62
partitions.
222d62
222d62
X-downstream-only: yes
222d62
Resolves: rhbz#1664227
222d62
222d62
Signed-off-by: Eduardo Otubo <otubo@redhat.com>
222d62
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
222d62
---
222d62
 cloudinit/sources/DataSourceAzure.py | 2 +-
222d62
 1 file changed, 1 insertion(+), 1 deletion(-)
222d62
222d62
diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py
222d62
index 46d57446..61d374a7 100644
222d62
--- a/cloudinit/sources/DataSourceAzure.py
222d62
+++ b/cloudinit/sources/DataSourceAzure.py
222d62
@@ -646,7 +646,7 @@ def can_dev_be_reformatted(devpath, preserve_ntfs):
222d62
         file_count = util.mount_cb(cand_path, count_files, mtype="ntfs",
222d62
                                    update_env_for_mount={'LANG': 'C'})
222d62
     except util.MountFailedError as e:
222d62
-        if "mount: unknown filesystem type 'ntfs'" in str(e):
222d62
+        if "unknown filesystem type 'ntfs'" in str(e):
222d62
             return True, (bmsg + ' but this system cannot mount NTFS,'
222d62
                           ' assuming there are no important files.'
222d62
                           ' Formatting allowed.')
222d62
-- 
222d62
2.19.1
222d62