diff options
author | Radek Novacek <rnovacek@redhat.com> | 2014-05-09 14:25:24 +0200 |
---|---|---|
committer | Radek Novacek <rnovacek@redhat.com> | 2014-05-13 08:24:44 +0200 |
commit | b619fa3610d0920f6b1cec737c9ff2b7b4839c94 (patch) | |
tree | 859b0ecdb34742a63e6b5fe2b71558341ae1fcfa /src | |
parent | 28aed3c2c360b84762f76b322e9fc80bd74c036b (diff) | |
download | openlmi-providers-b619fa3610d0920f6b1cec737c9ff2b7b4839c94.tar.gz openlmi-providers-b619fa3610d0920f6b1cec737c9ff2b7b4839c94.tar.xz openlmi-providers-b619fa3610d0920f6b1cec737c9ff2b7b4839c94.zip |
account: use defaultdict instead of Counter
Counter is not present in python <= 2.6, so replace it with defaultdict.
Diffstat (limited to 'src')
-rw-r--r-- | src/account/test/common.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/account/test/common.py b/src/account/test/common.py index 639fb61..95abd38 100644 --- a/src/account/test/common.py +++ b/src/account/test/common.py @@ -26,7 +26,7 @@ import os import tempfile import string import subprocess -from collections import Counter +from collections import defaultdict from collections import OrderedDict import methods @@ -99,7 +99,7 @@ class PasswdFile(): """ Find dups in fields that should be unique """ - dups = Counter() + dups = defaultdict(int) for field in self.options['unique']: if not methods.field_is_unique(field, self.users): dups[field] += 1 |