Lines 109-115
class Config(object):
Link Here
|
109 |
if self.options.dry_run and not os.path.exists(db_file): |
109 |
if self.options.dry_run and not os.path.exists(db_file): |
110 |
db = {} |
110 |
db = {} |
111 |
else: |
111 |
else: |
112 |
db = shelve.open(db_file, flag=open_flag) |
112 |
try: |
|
|
113 |
db = shelve.open(db_file, flag=open_flag) |
114 |
except ImportError as e: |
115 |
if e.name == 'bsddb': |
116 |
from bsddb3 import dbshelve as shelve |
117 |
db = shelve.open(db_file, flag=open_flag) |
118 |
|
113 |
if sys.hexversion < 0x3000000: |
119 |
if sys.hexversion < 0x3000000: |
114 |
db = ShelveUnicodeWrapper(db) |
120 |
db = ShelveUnicodeWrapper(db) |
115 |
|
121 |
|
116 |
- |
|
|