Skip to content

Commit b617f45

Browse files
author
Richard Jones
committed
Centralised the python version check code, bumped version to 2.1.1
(really needs to be 2.1.2, but that isn't released yet :)
1 parent 9643803 commit b617f45

File tree

7 files changed

+96
-25
lines changed

7 files changed

+96
-25
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Feature:
2323
. Message author's name appears in From: instead of roundup instance name
2424
(which still appears in the Reply-To:)
2525
. Added a Zope frontend for roundup.
26+
. Centralised the python version check code, bumped version to 2.1.1 (really
27+
needs to be 2.1.2, but that isn't released yet :)
2628

2729
Fixed:
2830
. Lots of bugs, thanks Roch� and others on the devel mailing list!

cgi-bin/roundup.cgi

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,10 @@
1616
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1717
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1818
#
19-
# $Id: roundup.cgi,v 1.21 2001-12-02 05:06:16 richard Exp $
19+
# $Id: roundup.cgi,v 1.22 2001-12-13 00:20:01 richard Exp $
2020

2121
# python version check
22-
import sys
23-
if not hasattr(sys, 'version_info') or sys.version_info[:2] < (2,1):
24-
print "Content-Type: text/plain\n"
25-
print "Roundup requires Python 2.1 or newer."
26-
sys.exit(0)
22+
from roundup import version_check
2723

2824
#
2925
## Configuration
@@ -200,6 +196,20 @@ LOG.close()
200196

201197
#
202198
# $Log: not supported by cvs2svn $
199+
# Revision 1.21 2001/12/02 05:06:16 richard
200+
# . We now use weakrefs in the Classes to keep the database reference, so
201+
# the close() method on the database is no longer needed.
202+
# I bumped the minimum python requirement up to 2.1 accordingly.
203+
# . #487480 ] roundup-server
204+
# . #487476 ] INSTALL.txt
205+
#
206+
# I also cleaned up the change message / post-edit stuff in the cgi client.
207+
# There's now a clearly marked "TODO: append the change note" where I believe
208+
# the change note should be added there. The "changes" list will obviously
209+
# have to be modified to be a dict of the changes, or somesuch.
210+
#
211+
# More testing needed.
212+
#
203213
# Revision 1.20 2001/11/26 22:55:56 richard
204214
# Feature:
205215
# . Added INSTANCE_NAME to configuration - used in web and email to identify

doc/index.html

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@ <h1><a name="installation">Installation</a></h1>
4747
<h2><a name="requires">Prerequisites</a></h2>
4848

4949
<dl>
50-
<dt>Either:
51-
<dd>Python 2.0 with pydoc installed. See http://www.lfw.org/ for pydoc.
52-
<dt>or
53-
<dd>Python 2.1 or later
50+
<dd>Python 2.1.1 is required for the correct operation of roundup
5451
</dl>
5552

5653
Download the latest version from
@@ -1200,7 +1197,7 @@ <h1><a name="ack">Acknowledgements</a></h1>
12001197

12011198
<p>&nbsp;</p>
12021199
<hr>
1203-
$Id: index.html,v 1.20 2001-12-10 00:57:38 richard Exp $
1200+
$Id: index.html,v 1.21 2001-12-13 00:20:01 richard Exp $
12041201
<p>&nbsp;</p>
12051202

12061203
</body></html>

roundup-admin

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@
1616
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1717
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1818
#
19-
# $Id: roundup-admin,v 1.52 2001-12-12 21:47:45 richard Exp $
19+
# $Id: roundup-admin,v 1.53 2001-12-13 00:20:00 richard Exp $
2020

21-
import sys
22-
if not hasattr(sys, 'version_info') or sys.version_info[:2] < (2,1):
23-
print 'Roundup requires python 2.1 or later.'
24-
sys.exit(1)
21+
# python version check
22+
from roundup import version_check
2523

2624
import string, os, getpass, getopt, re, UserDict
2725
try:
@@ -980,6 +978,12 @@ if __name__ == '__main__':
980978

981979
#
982980
# $Log: not supported by cvs2svn $
981+
# Revision 1.52 2001/12/12 21:47:45 richard
982+
# . Message author's name appears in From: instead of roundup instance name
983+
# (which still appears in the Reply-To:)
984+
# . envelope-from is now set to the roundup-admin and not roundup itself so
985+
# delivery reports aren't sent to roundup (thanks Patrick Ohly)
986+
#
983987
# Revision 1.51 2001/12/10 00:57:38 richard
984988
# From CHANGES:
985989
# . Added the "display" command to the admin tool - displays a node's values

roundup-mailgw

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1717
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1818
#
19-
# $Id: roundup-mailgw,v 1.17 2001-12-02 05:06:16 richard Exp $
19+
# $Id: roundup-mailgw,v 1.18 2001-12-13 00:20:01 richard Exp $
20+
21+
# python version check
22+
from roundup import version_check
2023

2124
import sys, os, re, cStringIO
22-
if not hasattr(sys, 'version_info') or sys.version_info[:2] < (2,1):
23-
print "Roundup requires Python 2.1 or newer."
24-
sys.exit(1)
2525

2626
from roundup.mailgw import Message
2727

@@ -168,6 +168,20 @@ if __name__ == '__main__':
168168

169169
#
170170
# $Log: not supported by cvs2svn $
171+
# Revision 1.17 2001/12/02 05:06:16 richard
172+
# . We now use weakrefs in the Classes to keep the database reference, so
173+
# the close() method on the database is no longer needed.
174+
# I bumped the minimum python requirement up to 2.1 accordingly.
175+
# . #487480 ] roundup-server
176+
# . #487476 ] INSTALL.txt
177+
#
178+
# I also cleaned up the change message / post-edit stuff in the cgi client.
179+
# There's now a clearly marked "TODO: append the change note" where I believe
180+
# the change note should be added there. The "changes" list will obviously
181+
# have to be modified to be a dict of the changes, or somesuch.
182+
#
183+
# More testing needed.
184+
#
171185
# Revision 1.16 2001/11/30 18:23:55 jhermann
172186
# Cleaned up strange import (less pollution, too)
173187
#

roundup-server

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,12 @@
2020
2121
Based on CGIHTTPServer in the Python library.
2222
23-
$Id: roundup-server,v 1.21 2001-12-02 05:06:16 richard Exp $
23+
$Id: roundup-server,v 1.22 2001-12-13 00:20:01 richard Exp $
2424
2525
"""
26-
import sys
27-
if not hasattr(sys, 'version_info') or sys.version_info[:2] < (2,1):
28-
print "Roundup requires Python 2.1 or newer."
29-
sys.exit(0)
26+
27+
# python version check
28+
from roundup import version_check
3029

3130
import os, urllib, StringIO, traceback, cgi, binascii, string, getopt, imp
3231
import BaseHTTPServer
@@ -249,6 +248,20 @@ if __name__ == '__main__':
249248

250249
#
251250
# $Log: not supported by cvs2svn $
251+
# Revision 1.21 2001/12/02 05:06:16 richard
252+
# . We now use weakrefs in the Classes to keep the database reference, so
253+
# the close() method on the database is no longer needed.
254+
# I bumped the minimum python requirement up to 2.1 accordingly.
255+
# . #487480 ] roundup-server
256+
# . #487476 ] INSTALL.txt
257+
#
258+
# I also cleaned up the change message / post-edit stuff in the cgi client.
259+
# There's now a clearly marked "TODO: append the change note" where I believe
260+
# the change note should be added there. The "changes" list will obviously
261+
# have to be modified to be a dict of the changes, or somesuch.
262+
#
263+
# More testing needed.
264+
#
252265
# Revision 1.20 2001/11/26 22:55:56 richard
253266
# Feature:
254267
# . Added INSTANCE_NAME to configuration - used in web and email to identify

roundup/version_check.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env python
2+
#
3+
# Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/)
4+
# This module is free software, and you may redistribute it and/or modify
5+
# under the same terms as Python, so long as this copyright message and
6+
# disclaimer are retained in their original form.
7+
#
8+
# IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR
9+
# DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING
10+
# OUT OF THE USE OF THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE
11+
# POSSIBILITY OF SUCH DAMAGE.
12+
#
13+
# BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
14+
# BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
15+
# FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
16+
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
17+
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
18+
#
19+
# $Id: version_check.py,v 1.1 2001-12-13 00:20:01 richard Exp $
20+
21+
import sys
22+
if not hasattr(sys, 'version_info') or sys.version_info[:2] < (2,1,1):
23+
print "Content-Type: text/plain\n"
24+
print "Roundup requires Python 2.1.1 or newer."
25+
sys.exit(0)
26+
27+
#
28+
# $Log: not supported by cvs2svn $
29+
#
30+
#
31+
# vim: set filetype=python ts=4 sw=4 et si

0 commit comments

Comments
 (0)