lists.arthurdejong.org
RSS feed

webcheck commit: r442 - in webcheck: . webcheck

[Date Prev][Date Next] [Thread Prev][Thread Next]

webcheck commit: r442 - in webcheck: . webcheck



Author: arthur
Date: Fri Oct  7 10:09:37 2011
New Revision: 442
URL: http://arthurdejong.org/viewvc/webcheck?revision=442&view=revision

Log:
move profiling flag from config to cmd

Modified:
   webcheck/cmd.py
   webcheck/webcheck/config.py

Modified: webcheck/cmd.py
==============================================================================
--- webcheck/cmd.py     Fri Oct  7 09:57:08 2011        (r441)
+++ webcheck/cmd.py     Fri Oct  7 10:09:37 2011        (r442)
@@ -41,6 +41,11 @@
 
 debugio.loglevel = debugio.INFO
 
+# Whether to produce profiling information. This is for development
+# purposes and as such undocumented.
+# http://docs.python.org/lib/profile.html
+PROFILE = False
+
 
 def print_version():
     """Print version information."""
@@ -126,7 +131,8 @@
                 debugio.loglevel = debugio.DEBUG
             elif flag in ('--profile',):
                 # undocumented on purpose
-                config.PROFILE = True
+                global PROFILE
+                PROFILE = True
             elif flag in ('-o', '--output'):
                 config.OUTPUT_DIR = arg
             elif flag in ('-c', '--continue'):
@@ -261,7 +267,7 @@
         # parse command-line arguments
         parse_args(site)
         # run the main program
-        if config.PROFILE:
+        if PROFILE:
             fname = os.path.join(config.OUTPUT_DIR, 'webcheck.prof')
             try:
                 import cProfile

Modified: webcheck/webcheck/config.py
==============================================================================
--- webcheck/webcheck/config.py Fri Oct  7 09:57:08 2011        (r441)
+++ webcheck/webcheck/config.py Fri Oct  7 10:09:37 2011        (r442)
@@ -48,11 +48,6 @@
 # Whether to try to read a state file to continue from.
 CONTINUE = False
 
-# Whether to produce profiling information. This is for development
-# purposes and as such undocumented.
-# http://docs.python.org/lib/profile.html
-PROFILE = False
-
 # This is the time in seconds to wait between requests. This is the state of
 # the -w command line option.
 WAIT_BETWEEN_REQUESTS = 0
-- 
To unsubscribe send an email to
webcheck-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/webcheck-commits/