Minor tweaks for PEP 8 compliance.

This commit is contained in:
Anthony Tuininga 2021-05-18 16:56:55 -06:00
parent cfa2750854
commit 0633e1017c
5 changed files with 8 additions and 8 deletions

View File

@ -66,7 +66,7 @@ connection.commit()
print("\nDequeuing messages...")
batch_size = 8
while True:
messages = queue.deqMany(batch_size)
messages = queue.deqmany(batch_size)
if not messages:
break
for props in messages:

View File

@ -60,8 +60,8 @@ print("--> Protocol:", sub.protocol)
print("--> Timeout:", sub.timeout)
print("--> Operations:", sub.operations)
print("--> Rowids?:", bool(sub.qos & oracledb.SUBSCR_QOS_ROWIDS))
queryId = sub.registerquery("select * from TestTempTable")
print("Registered query:", queryId)
query_id = sub.registerquery("select * from TestTempTable")
print("Registered query:", query_id)
while registered:
print("Waiting for notifications....")

View File

@ -59,8 +59,8 @@ try:
connection.commit() # this should fail
sys.exit("Session was not killed. Terminating.")
except oracledb.DatabaseError as e:
errorObj, = e.args
if not errorObj.isrecoverable:
error_obj, = e.args
if not error_obj.isrecoverable:
sys.exit("Session is not recoverable. Terminating.")
ltxid = connection.ltxid
if not ltxid:

View File

@ -48,7 +48,7 @@ def building_in_converter(value):
def building_out_converter(obj):
return Building(int(obj.BUILDINGID), obj.DESCRIPTION, int(obj.NUMFLOORS),
obj.DATEBUILT)
obj.DATEBUILT)
def input_type_handler(cursor, value, num_elements):

View File

@ -11,10 +11,10 @@
2400 - Module for testing session pools
"""
import test_env
import threading
import cx_Oracle as oracledb
import threading
import test_env
class TestCase(test_env.BaseTestCase):
require_connection = False