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.8 by eulisse, Mon Mar 3 16:42:59 2008 UTC vs.
Revision 1.9 by eulisse, Tue Mar 4 11:59:34 2008 UTC

# Line 112 | Line 112 | class StartCommand (Command):
112                  os.unlink (filename)
113          except IOError:
114              # TODO: this should be a warning.
115 <            print "File %s does not exists. Will be created." % filename
115 >            g_Logger.trace ("File %s does not exists. Will be created." % filename)
116          
117          open (filename, 'w').write (str (os.getpid ()))
118          self.context.addService (CmdLineArgs (self.context.OptionParser ()))
# Line 210 | Line 210 | class CmsWebApplication (object):
210                              type="int")
211      
212      def run (self):
213 +        if "--help" in sys.argv:
214 +            g_Logger.detailLevel = -100
215          validOptions = getValidOptions (sys.argv)
216  
217          opts, args = self.parser.parse_args (args=validOptions)
218 <        
218 >
219          g_Logger.stream = opts.logFile
220 <        g_Logger.detailLevel = opts.logLevel
220 >        if "--help" not in sys.argv:
221 >            g_Logger.detailLevel = opts.logLevel
222          
223          if not len (args):
224              args = ["start"]
# Line 223 | Line 226 | class CmsWebApplication (object):
226          factory = CommandFactory (self.context, opts, args)
227          startCommand = factory.createByName (args[0])
228          if not startCommand:
229 <            print "Command %s not known." % args[0]
229 >            "Command %s not known." % args[0]
230              sys.exit (1)
231          startCommand.run ()
232          startCommand.finish ()

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines