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...") print("\nDequeuing messages...")
batch_size = 8 batch_size = 8
while True: while True:
messages = queue.deqMany(batch_size) messages = queue.deqmany(batch_size)
if not messages: if not messages:
break break
for props in messages: for props in messages:

View File

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

View File

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

View File

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

View File

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