sailesh1993 / rpms / cloud-init

Forked from rpms/cloud-init a year ago
Clone
Blob Blame History Raw
From f502ab105bca61613a4ff83aa5ea373bc00bb4e9 Mon Sep 17 00:00:00 2001
From: Eduardo Otubo <otubo@redhat.com>
Date: Thu, 10 Jan 2019 10:03:14 +0100
Subject: [PATCH] Fix string missmatch when mounting ntfs

RH-Author: Eduardo Otubo <otubo@redhat.com>
Message-id: <20190110100314.32713-1-otubo@redhat.com>
Patchwork-id: 83943
O-Subject: [RHEL-8.0 cloud-init PATCH] Fix string missmatch when mounting ntfs
Bugzilla: 1664227
RH-Acked-by: Vitaly Kuznetsov <vkuznets@redhat.com>
RH-Acked-by: Mohammed Gamal <mgamal@redhat.com>

This patch fixes a simple string missmatch when attempting to mount ntfs
partitions.

X-downstream-only: yes
Resolves: rhbz#1664227

Signed-off-by: Eduardo Otubo <otubo@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 cloudinit/sources/DataSourceAzure.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py
index 46d57446..61d374a7 100644
--- a/cloudinit/sources/DataSourceAzure.py
+++ b/cloudinit/sources/DataSourceAzure.py
@@ -646,7 +646,7 @@ def can_dev_be_reformatted(devpath, preserve_ntfs):
         file_count = util.mount_cb(cand_path, count_files, mtype="ntfs",
                                    update_env_for_mount={'LANG': 'C'})
     except util.MountFailedError as e:
-        if "mount: unknown filesystem type 'ntfs'" in str(e):
+        if "unknown filesystem type 'ntfs'" in str(e):
             return True, (bmsg + ' but this system cannot mount NTFS,'
                           ' assuming there are no important files.'
                           ' Formatting allowed.')
-- 
2.19.1