changeset 244:a7bc7da97a81

keeping python 2.4 compatibility
author catherine@dellzilla
date Mon, 02 Mar 2009 16:36:26 -0500
parents 98d8746f211b
children 05c90f80815c
files sqlpython/sqlpyPlus.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sqlpython/sqlpyPlus.py	Mon Mar 02 16:21:54 2009 -0500
+++ b/sqlpython/sqlpyPlus.py	Mon Mar 02 16:36:26 2009 -0500
@@ -1107,7 +1107,7 @@
             moreColumns = ''
             
         # 'Normal' sort order is DATE DESC (maybe), object type ASC, object name ASC
-        sortdirection = ('DESC' if hasattr(opts, 'reverse') and opts.reverse else 'ASC')
+        sortdirection = (hasattr(opts, 'reverse') and opts.reverse and 'DESC') or 'ASC'
         orderby = 'object_type %s, object_name %s' % (sortdirection, sortdirection)
         if hasattr(opts, 'timesort') and opts.timesort:
             orderby = 'last_ddl_time %s, %s' % (('ASC' if hasattr(opts, 'reverse') and opts.reverse else 'DESC'), orderby)