From 75c3482a8685151407c186ce5b1f3b8af3db49d4 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Wed, 14 Nov 2012 19:22:38 -0800 Subject: Fix sudoers being written multiple times when strings are used. LP: #1079002 --- cloudinit/distros/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cloudinit/distros') diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py index ea0bac23..24e6f637 100644 --- a/cloudinit/distros/__init__.py +++ b/cloudinit/distros/__init__.py @@ -24,7 +24,6 @@ from StringIO import StringIO import abc -import collections import itertools import os import re @@ -421,7 +420,7 @@ class Distro(object): '', "# User rules for %s" % user, ] - if isinstance(rules, collections.Iterable): + if isinstance(rules, (list, tuple)): for rule in rules: lines.append("%s %s" % (user, rule)) else: -- cgit v1.2.3