annotate roundup/version_check.py @ 3909:e89bcb28f683

indexargs_url force ids to int ids appear as hyperdb.String instances, which confused indexargs_url when they appear in the filterspec. They need to be treated as treated as integers when generating URLs. It feels sort of hacky to check for 'id' like this but I'm at a loss for what else to do in this case. Suggestions are welcome :) Maybe we should look into using some other hyperdb class to represent ids? this fixes [SF#783492] Some trailing whitespace also got trimmed.
author Justus Pendleton <jpend@users.sourceforge.net>
date Tue, 18 Sep 2007 16:59:42 +0000
parents fc52d57c6c3e
children 6e3e4f24c753
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
449
141aacfdb34f Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
1 #!/usr/bin/env python
141aacfdb34f Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
2 #
141aacfdb34f Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
3 # Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/)
141aacfdb34f Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
4 # This module is free software, and you may redistribute it and/or modify
141aacfdb34f Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
5 # under the same terms as Python, so long as this copyright message and
141aacfdb34f Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
6 # disclaimer are retained in their original form.
141aacfdb34f Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
7 #
141aacfdb34f Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
8 # IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR
141aacfdb34f Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
9 # DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING
141aacfdb34f Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
10 # OUT OF THE USE OF THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE
141aacfdb34f Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
11 # POSSIBILITY OF SUCH DAMAGE.
141aacfdb34f Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
12 #
141aacfdb34f Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
13 # BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
141aacfdb34f Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
141aacfdb34f Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
141aacfdb34f Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
141aacfdb34f Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
141aacfdb34f Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
18 #
2005
fc52d57c6c3e documentation cleanup
Richard Jones <richard@users.sourceforge.net>
parents: 1090
diff changeset
19 # $Id: version_check.py,v 1.4 2004-02-11 23:55:08 richard Exp $
fc52d57c6c3e documentation cleanup
Richard Jones <richard@users.sourceforge.net>
parents: 1090
diff changeset
20
fc52d57c6c3e documentation cleanup
Richard Jones <richard@users.sourceforge.net>
parents: 1090
diff changeset
21 """Enforces the minimum Python version that Roundup requires.
fc52d57c6c3e documentation cleanup
Richard Jones <richard@users.sourceforge.net>
parents: 1090
diff changeset
22 """
fc52d57c6c3e documentation cleanup
Richard Jones <richard@users.sourceforge.net>
parents: 1090
diff changeset
23 __docformat__ = 'restructuredtext'
449
141aacfdb34f Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
24
141aacfdb34f Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
25 import sys
451
55654ff0028c Fixed version_check
Richard Jones <richard@users.sourceforge.net>
parents: 449
diff changeset
26 if not hasattr(sys, 'version_info') or sys.version_info[:3] < (2,1,1):
449
141aacfdb34f Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
27 print "Content-Type: text/plain\n"
141aacfdb34f Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
28 print "Roundup requires Python 2.1.1 or newer."
141aacfdb34f Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
29 sys.exit(0)
141aacfdb34f Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
30
141aacfdb34f Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
31 # vim: set filetype=python ts=4 sw=4 et si

Roundup Issue Tracker: http://roundup-tracker.org/