summaryrefslogtreecommitdiff
path: root/cloudinit/distros
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-11-14 19:22:38 -0800
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-11-14 19:22:38 -0800
commit75c3482a8685151407c186ce5b1f3b8af3db49d4 (patch)
treecaeb3c4c0aeb9993c47ec4516b2c6f333e87dfa2 /cloudinit/distros
parent024cd9fecddb4756fd33eaecaa5623ef690485d0 (diff)
downloadvyos-cloud-init-75c3482a8685151407c186ce5b1f3b8af3db49d4.tar.gz
vyos-cloud-init-75c3482a8685151407c186ce5b1f3b8af3db49d4.zip
Fix sudoers being written multiple times when strings are used.
LP: #1079002
Diffstat (limited to 'cloudinit/distros')
-rw-r--r--cloudinit/distros/__init__.py3
1 files changed, 1 insertions, 2 deletions
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: