ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/WEBTOOLS/cmsWeb.py
(Generate patch)

Comparing COMP/WEBTOOLS/cmsWeb.py (file contents):
Revision 1.3 by eulisse, Fri Mar 30 16:23:29 2007 UTC vs.
Revision 1.4 by eulisse, Fri May 18 08:47:48 2007 UTC

# Line 9 | Line 9 | class Cfg:
9          # TODO: make it a property.
10          self.installRoot = __file__.rsplit ("/", 1)[0]
11  
12 +    
13   if __name__ == '__main__':
14      context = Context ()
15      context.addService (OptionParser ())
# Line 17 | Line 18 | if __name__ == '__main__':
18                                          default=False,
19                                          action="store_true",
20                                          dest="profile")
21 <    
21 >    def stripTrailingSlash (option, opt_str, value, parser, *args, **kwargs):
22 >        setattr(parser.values, option.dest, value.rstrip ("/"))
23 >        
24      context.OptionParser ().add_option ("--base-url",
25                                          help="Base URL for the server (for usage behind a proxy).",
26                                          default="http://localhost:8030",
27 <                                        dest="baseUrl")
27 >                                        dest="baseUrl",
28 >                                        action="callback",
29 >                                        callback=stripTrailingSlash,
30 >                                        type="str",
31 >                                        nargs=1)
32      
33      app = BonsaiServer (context)
34      

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines