Обсуждение: python - fe: Fix repr()'s and correct logic for extracting result count.

Поиск
Список
Период
Сортировка

python - fe: Fix repr()'s and correct logic for extracting result count.

От
jwp@pgfoundry.org (James William Pye)
Дата:
Log Message:
-----------
Fix repr()'s and correct logic for extracting result count.

The code that grabbed the result count used the (x and y or z) idiom to decide
whether to return an integer or the whole message. This, of course, breaks
horribly when the result message is 'UPDATE 0', as zero is not nonzero and thus
the message is returned instead of the count. Stop that.

From the i-cant-wait-till-python-gets-?-and-:-dept.

Modified Files:
--------------
    fe/test:
        tracenull.py (r1.13 -> r1.14)
        (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/python/fe/test/tracenull.py.diff?r1=1.13&r2=1.14)
    fe/src:
        abstract.py (r1.3 -> r1.4)
        (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/python/fe/src/abstract.py.diff?r1=1.3&r2=1.4)
        tracenull.py (r1.26 -> r1.27)
        (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/python/fe/src/tracenull.py.diff?r1=1.26&r2=1.27)