Skip to content

Commit bfcfa13

Browse files
author
Alexander Smishlajev
committed
fix: have_backend() broke if metakit or sqlite bakend is not available
1 parent 8a90334 commit bfcfa13

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

roundup/backends/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: __init__.py,v 1.30 2004-11-18 15:50:37 a1s Exp $
18+
# $Id: __init__.py,v 1.31 2004-11-20 11:31:42 a1s Exp $
1919

2020
'''Container for the hyperdb storage backend implementations.
2121
'''
@@ -60,7 +60,8 @@ def have_backend(name):
6060
return 1
6161
except ImportError, e:
6262
global _modules
63-
if not str(e).startswith('No module named %s' % _modules[name]):
63+
if not str(e).startswith('No module named %s'
64+
% _modules.get(name, name)):
6465
raise
6566
return 0
6667

0 commit comments

Comments
 (0)