diff options
author | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-11-14 19:22:38 -0800 |
---|---|---|
committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-11-14 19:22:38 -0800 |
commit | 75c3482a8685151407c186ce5b1f3b8af3db49d4 (patch) | |
tree | caeb3c4c0aeb9993c47ec4516b2c6f333e87dfa2 /cloudinit | |
parent | 024cd9fecddb4756fd33eaecaa5623ef690485d0 (diff) | |
download | vyos-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')
-rw-r--r-- | cloudinit/distros/__init__.py | 3 |
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: |