summaryrefslogtreecommitdiffstats
path: root/Lib/dumbdbm.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/dumbdbm.py')
-rw-r--r--Lib/dumbdbm.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/dumbdbm.py b/Lib/dumbdbm.py
index 4a0c3a7..46d543d 100644
--- a/Lib/dumbdbm.py
+++ b/Lib/dumbdbm.py
@@ -21,6 +21,7 @@ is read when the database is opened, and some updates rewrite the whole index)
"""
+import ast as _ast
import os as _os
import __builtin__
import UserDict
@@ -85,7 +86,7 @@ class _Database(UserDict.DictMixin):
with f:
for line in f:
line = line.rstrip()
- key, pos_and_siz_pair = eval(line)
+ key, pos_and_siz_pair = _ast.literal_eval(line)
self._index[key] = pos_and_siz_pair
# Write the index dict to the directory file. The original directory