Skip to content

Commit 9c5a0d8

Browse files
committed
import UserDict from collections or UserDict
1 parent fd769e3 commit 9c5a0d8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

roundup/admin.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
__docformat__ = 'restructuredtext'
2525

26-
import csv, getopt, getpass, os, re, shutil, sys, UserDict, operator
26+
import csv, getopt, getpass, os, re, shutil, sys, operator
2727

2828
from roundup import date, hyperdb, roundupdb, init, password, token
2929
from roundup import __version__ as roundup_version
@@ -33,7 +33,12 @@
3333
from roundup.exceptions import UsageError
3434
from roundup.anypy.my_input import my_input
3535

36-
class CommandDict(UserDict.UserDict):
36+
try:
37+
from UserDict import UserDict
38+
except ImportError:
39+
from collections import UserDict
40+
41+
class CommandDict(UserDict):
3742
"""Simple dictionary that lets us do lookups using partial keys.
3843
3944
Original code submitted by Engelbert Gruber.

0 commit comments

Comments
 (0)