Skip to content

Commit 2ab6f76

Browse files
committed
Test case for backend not defined; remove unreachable code
Verify that error is raised in configuration.py if backend is not defined in config.ini. Remove unreachable code from instance.py that detects that backend is not defined. It hasn't been reachable since version 1.6.1 because the configuration.py module made the backend option mandatory. Hence configuration.py raises the error and never passes control back to the unreachable code.
1 parent 3bbadea commit 2ab6f76

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

roundup/instance.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,6 @@ def __init__(self, tracker_home, optimize=0):
8080

8181
rdbms_backend = self.config.RDBMS_BACKEND
8282

83-
# TODO: Remove in v1.7
84-
# Provide some backwards compatability for existing Roundup instances
85-
# that still define the backend type in 'db/backend_name' and warn the
86-
# users they need to update their config.ini. Note that a missing
87-
# rdbms backend causes the config to throw an error, so this may
88-
# not be possible.
89-
if rdbms_backend == '':
90-
raise TrackerError("database backend not found in config.ini.\n"
91-
"Old style `backend_name` in db directory not supported\n"
92-
"See doc/upgrading.txt for required steps.")
93-
9483
self.backend = backends.get_backend(rdbms_backend)
9584

9685
if self.optimize:

0 commit comments

Comments
 (0)