add trailing CR to the error message. use hasattr() rather than "in dir()"
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@139 8cb11bc2-c004-0410-86c3-e597b4017df7remotes/tags/V0_6
parent
8996332950
commit
892364776e
|
@ -25,10 +25,11 @@ _no_datetime = """\
|
|||
ERROR: Your version of MySQLdb requires the mxDateTime module
|
||||
for the Timestamp() and TimestampFromTicks() methods.
|
||||
You will need to install mxDateTime to use the ViewCVS
|
||||
database."""
|
||||
database.
|
||||
"""
|
||||
|
||||
if "Timestamp" not in dir(MySQLdb) or \
|
||||
"TimestampFromTicks" not in dir(MySQLdb):
|
||||
if not hasattr(MySQLdb, "Timestamp") or \
|
||||
not hasattr(MySQLdb, "TimestampFromTicks"):
|
||||
sys.stderr.write(_no_datetime)
|
||||
sys.exit(1)
|
||||
|
||||
|
|
Loading…
Reference in New Issue