Ubuntu Pastebin

Paste from smoser at Fri, 2 Dec 2016 19:25:22 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py
index af5d43b..c46cd07 100644
--- a/cloudinit/sources/DataSourceAzure.py
+++ b/cloudinit/sources/DataSourceAzure.py
@@ -305,7 +305,7 @@ def can_dev_be_reformatted(devpath):
         return False, msg
 
     def count_files(mp):
-        ignored = {'dataloss_warning_readme.txt'}
+        ignored = set(['dataloss_warning_readme.txt'])
         return len([f for f in os.listdir(mp) if f.lower() not in ignored])
 
     bmsg = ('partition 1 (%s -> %s) on device %s was ntfs formatted' %
diff --git a/tests/unittests/test_util.py b/tests/unittests/test_util.py
index bf9df56..4df1c91 100644
--- a/tests/unittests/test_util.py
+++ b/tests/unittests/test_util.py
@@ -626,7 +626,7 @@ class TestProcessExecutionError(helpers.TestCase):
     def test_pexec_error_indent_text(self):
         error = util.ProcessExecutionError()
         msg = 'abc\ndef'
-        formatted = 'abc\n{}def'.format(' ' * 4)
+        formatted = 'abc\n{0}def'.format(' ' * 4)
         self.assertEqual(error._indent_text(msg, indent_level=4), formatted)
         self.assertEqual(error._indent_text(msg.encode(), indent_level=4),
                          formatted.encode())
Download as text