Mercurial > p > roundup > code
comparison cgi-bin/roundup.cgi @ 482:fdee2ff82b40 config-0-4-0-branch
Miscellaneous improvements
* Altered function names in roundup.config to bE NeAtEr rather_than_ugly;
* Created some extra roundup.config exceptions to let people know what's
going on;
* Modified instance_config.py to use those exceptions, so that syntax errors
or other exceptions did *not* trigger the same behavior as import
while in the templates/ directory.
* Modified roundup.cgi to use the same neater function names, plus did some
minor cleanup.
| author | Titus Brown <titus@users.sourceforge.net> |
|---|---|
| date | Thu, 03 Jan 2002 08:28:17 +0000 |
| parents | a5cd27d33516 |
| children | c242455d9b46 |
comparison
equal
deleted
inserted
replaced
| 481:a261b0bbba43 | 482:fdee2ff82b40 |
|---|---|
| 14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | 14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" | 15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
| 16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, | 16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
| 17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 18 # | 18 # |
| 19 # $Id: roundup.cgi,v 1.22.2.1 2002-01-03 02:12:05 titus Exp $ | 19 # $Id: roundup.cgi,v 1.22.2.2 2002-01-03 08:28:15 titus Exp $ |
| 20 | 20 |
| 21 # python version check | 21 # python version check |
| 22 import sys | 22 import sys |
| 23 from roundup import version_check | 23 from roundup import version_check |
| 24 | 24 |
| 39 # logging is turned off (unless you changed the default below). | 39 # logging is turned off (unless you changed the default below). |
| 40 | 40 |
| 41 # ROUNDUP_DEBUG is a debug level, currently only 0 (OFF) and 1 (ON) are | 41 # ROUNDUP_DEBUG is a debug level, currently only 0 (OFF) and 1 (ON) are |
| 42 # used in the code. Higher numbers means more debugging output. | 42 # used in the code. Higher numbers means more debugging output. |
| 43 | 43 |
| 44 # This indicates where the Roundup instance lives | |
| 45 ROUNDUP_INSTANCE_HOMES = { | |
| 46 # 'dev' : '/u/t/dev/roundup/instance' | |
| 47 } | |
| 48 | |
| 49 ### @CTB config file. | |
| 50 import roundup.config | 44 import roundup.config |
| 51 base_config = roundup.config.load_base_config() | 45 base_config = roundup.config.loadBaseConfig() |
| 52 instances_config = base_config.load_instances_config() | 46 instances = base_config.loadInstances() |
| 53 | 47 |
| 54 for name in instances_config.get_instance_names(): | 48 ROUNDUP_INSTANCE_HOMES = {} |
| 55 ROUNDUP_INSTANCE_HOMES[name] = instances_config.get_instance_dir(name) | 49 for name in instances.getNames(): |
| 50 ROUNDUP_INSTANCE_HOMES[name] = instances.getDirFromName(name) | |
| 56 | 51 |
| 57 # Where to log debugging information to. Use an instance of DevNull if you | 52 # Where to log debugging information to. Use an instance of DevNull if you |
| 58 # don't want to log anywhere. | 53 # don't want to log anywhere. |
| 59 class DevNull: | 54 class DevNull: |
| 60 def write(self, info): | 55 def write(self, info): |
| 206 sys.stdout, sys.stderr = out, err | 201 sys.stdout, sys.stderr = out, err |
| 207 LOG.close() | 202 LOG.close() |
| 208 | 203 |
| 209 # | 204 # |
| 210 # $Log: not supported by cvs2svn $ | 205 # $Log: not supported by cvs2svn $ |
| 206 # Revision 1.22.2.1 2002/01/03 02:12:05 titus | |
| 207 # | |
| 208 # | |
| 209 # Initial ConfigParser implementation. | |
| 210 # | |
| 211 # Revision 1.22 2001/12/13 00:20:01 richard | 211 # Revision 1.22 2001/12/13 00:20:01 richard |
| 212 # . Centralised the python version check code, bumped version to 2.1.1 (really | 212 # . Centralised the python version check code, bumped version to 2.1.1 (really |
| 213 # needs to be 2.1.2, but that isn't released yet :) | 213 # needs to be 2.1.2, but that isn't released yet :) |
| 214 # | 214 # |
| 215 # Revision 1.21 2001/12/02 05:06:16 richard | 215 # Revision 1.21 2001/12/02 05:06:16 richard |
