Mercurial > p > roundup > code
comparison roundup/admin.py @ 5455:118f5ffd194e
import UserDict from collections or UserDict
| author | Christof Meerwald <cmeerw@cmeerw.org> |
|---|---|
| date | Mon, 23 Jul 2018 21:41:23 +0100 |
| parents | 3fa026621f69 |
| children | 52ff4c59fb05 |
comparison
equal
deleted
inserted
replaced
| 5454:fbbcbfc6dad0 | 5455:118f5ffd194e |
|---|---|
| 21 """ | 21 """ |
| 22 from __future__ import print_function | 22 from __future__ import print_function |
| 23 | 23 |
| 24 __docformat__ = 'restructuredtext' | 24 __docformat__ = 'restructuredtext' |
| 25 | 25 |
| 26 import csv, getopt, getpass, os, re, shutil, sys, UserDict, operator | 26 import csv, getopt, getpass, os, re, shutil, sys, operator |
| 27 | 27 |
| 28 from roundup import date, hyperdb, roundupdb, init, password, token | 28 from roundup import date, hyperdb, roundupdb, init, password, token |
| 29 from roundup import __version__ as roundup_version | 29 from roundup import __version__ as roundup_version |
| 30 import roundup.instance | 30 import roundup.instance |
| 31 from roundup.configuration import CoreConfig, NoConfigError | 31 from roundup.configuration import CoreConfig, NoConfigError |
| 32 from roundup.i18n import _ | 32 from roundup.i18n import _ |
| 33 from roundup.exceptions import UsageError | 33 from roundup.exceptions import UsageError |
| 34 from roundup.anypy.my_input import my_input | 34 from roundup.anypy.my_input import my_input |
| 35 | 35 |
| 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): | |
| 37 """Simple dictionary that lets us do lookups using partial keys. | 42 """Simple dictionary that lets us do lookups using partial keys. |
| 38 | 43 |
| 39 Original code submitted by Engelbert Gruber. | 44 Original code submitted by Engelbert Gruber. |
| 40 """ | 45 """ |
| 41 _marker = [] | 46 _marker = [] |
