* viewcvs/lib/ezt.py

Import LongType from types, too.
  (_get_value): Handle conversion of LongType as well.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@806 8cb11bc2-c004-0410-86c3-e597b4017df7
remotes/tags/1.0.0-rc1
cmpilato 2004-02-20 18:20:59 +00:00
parent 68bd35d7e1
commit d57c96259e
1 changed files with 4 additions and 2 deletions

View File

@ -169,7 +169,7 @@ Directives
import string
import re
from types import StringType, IntType, FloatType
from types import StringType, IntType, FloatType, LongType
import os
#
@ -503,7 +503,9 @@ def _get_value((refname, start, rest), ctx):
raise UnknownReference(refname)
# make sure we return a string instead of some various Python types
if isinstance(ob, IntType) or isinstance(ob, FloatType):
if isinstance(ob, IntType) \
or isinstance(ob, LongType) \
or isinstance(ob, FloatType):
return str(ob)
if ob is None:
return ''