webcheck commit: r466 - in webcheck: . webcheck
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
webcheck commit: r466 - in webcheck: . webcheck
- From: Commits of the webcheck project <webcheck-commits [at] lists.arthurdejong.org>
- To: webcheck-commits [at] lists.arthurdejong.org
- Reply-to: webcheck-users [at] lists.arthurdejong.org
- Subject: webcheck commit: r466 - in webcheck: . webcheck
- Date: Wed, 16 Nov 2011 12:40:18 +0100 (CET)
Author: devin
Date: Wed Nov 16 12:40:16 2011
New Revision: 466
URL: http://arthurdejong.org/viewvc/webcheck?revision=466&view=revision
Log:
move cmd.py to package to support an entry point called webcheck
Added:
webcheck/webcheck/cmd.py
- copied, changed from r461, webcheck/cmd.py
Deleted:
webcheck/cmd.py
Copied and modified: webcheck/webcheck/cmd.py (from r461, webcheck/cmd.py)
==============================================================================
--- webcheck/cmd.py Wed Nov 16 12:16:45 2011 (r461, copy source)
+++ webcheck/webcheck/cmd.py Wed Nov 16 12:40:16 2011 (r466)
@@ -196,33 +196,13 @@
crawler.generate()
logging.info('done.')
-
-if __name__ == '__main__':
- try:
- # initialize crawler object
- crawler = Crawler()
- # parse command-line arguments
- parse_args(crawler)
- # configure logging
- logging.basicConfig(format='webcheck: %(levelname)s: %(message)s',
level=LOGLEVEL)
- # run the main program
- if PROFILE:
- fname = os.path.join(config.OUTPUT_DIR, 'webcheck.prof')
- try:
- import cProfile
- except ImportError:
- import profile as cProfile
- try:
- import sqltap
- sqltap.start()
- except ImportError:
- pass
- cProfile.run('main(crawler)', fname)
- if 'sqltap' in locals():
- statistics = sqltap.collect()
- sqltap.report(statistics, os.path.join(config.OUTPUT_DIR,
'sqltap.html'))
- else:
- main(crawler)
- except KeyboardInterrupt:
- sys.stderr.write('Interrupted\n')
- sys.exit(1)
+def entry_point():
+ """setuptools entry point"""
+ # initialize crawler object
+ crawler = Crawler()
+ # parse command-line arguments
+ parse_args(crawler)
+ # configure logging
+ logging.basicConfig(format='webcheck: %(levelname)s: %(message)s',
level=LOGLEVEL)
+ # run the main program
+ main(crawler)
--
To unsubscribe send an email to
webcheck-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/webcheck-commits/
- webcheck commit: r466 - in webcheck: . webcheck,
Commits of the webcheck project