]> git.llucax.com Git - software/blitiri.git/commitdiff
Relax config import to make it usable.
authorAlberto Bertogli <albertito@gmail.com>
Tue, 22 May 2007 05:30:36 +0000 (02:30 -0300)
committerAlberto Bertogli <albertito@gmail.com>
Tue, 22 May 2007 05:30:36 +0000 (02:30 -0300)
The os.path.isfile("config.py") check is too strict: it makes blitiri
usable from the command line only if it's ran in the directory where it
lives.

There's no point in doing that, let's just relax the import.
The chances of a config module collision are too low to be worth the
usability problem.

Signed-off-by: Alberto Bertogli <albertito@gmail.com>
blitiri.cgi

index c43835d2710b81d86631724efc9e7a06bb5c43ff..dd873877b8607bdbff696ff5395c49a086c085b9 100755 (executable)
@@ -51,11 +51,10 @@ import cgi
 from docutils.core import publish_parts
 
 # Load the config file, if there is one
-if os.path.isfile("config.py"):
-       try:
-               from config import *
-       except:
-               pass
+try:
+       from config import *
+except:
+       pass
 
 
 # Default template