comparison roundup/instance.py @ 6330:fbce23af2120

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.
author John Rouillard <rouilj@ieee.org>
date Tue, 02 Mar 2021 00:08:51 -0500
parents 778a9f455067
children 808f7a8ed2b6 30358e334232
comparison
equal deleted inserted replaced
6329:207b0fc82fc1 6330:fbce23af2120
77 self.load_interfaces() 77 self.load_interfaces()
78 self.templates = templating.get_loader(self.config["TEMPLATES"], 78 self.templates = templating.get_loader(self.config["TEMPLATES"],
79 self.config["TEMPLATE_ENGINE"]) 79 self.config["TEMPLATE_ENGINE"])
80 80
81 rdbms_backend = self.config.RDBMS_BACKEND 81 rdbms_backend = self.config.RDBMS_BACKEND
82
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 82
94 self.backend = backends.get_backend(rdbms_backend) 83 self.backend = backends.get_backend(rdbms_backend)
95 84
96 if self.optimize: 85 if self.optimize:
97 self.templates.precompile() 86 self.templates.precompile()

Roundup Issue Tracker: http://roundup-tracker.org/