Skip to content

Commit

Permalink
Small changes list compensations
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandr N Zamaraev committed Nov 3, 2011
1 parent 38a14f2 commit fcb167c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions firebirdsql/fbcore.py
Expand Up @@ -27,14 +27,14 @@ def b2i(b):

if PYTHON_MAJOR_VER == 2:
def bytes(byte_array):
return ''.join([chr(c) for c in byte_array])
return ''.join(chr(c) for c in byte_array)

__version__ = '0.6.2'
apilevel = '2.0'
threadsafety = 1
paramstyle = 'qmark'

transaction_parameter_block = [
transaction_parameter_block = (
# ISOLATION_LEVEL_READ_UNCOMMITTED
bytes([isc_tpb_version3, isc_tpb_write, isc_tpb_wait, isc_tpb_read_committed, isc_tpb_rec_version]),
# ISOLATION_LEVEL_READ_COMMITED
Expand All @@ -45,7 +45,7 @@ def bytes(byte_array):
bytes([isc_tpb_version3, isc_tpb_write, isc_tpb_wait, isc_tpb_consistency]),
# ISOLATION_LEVEL_READ_COMMITED_READ_ONLY
bytes([isc_tpb_version3, isc_tpb_read, isc_tpb_wait, isc_tpb_read_committed, isc_tpb_no_rec_version]),
]
)

def Date(year, month, day):
return datetime.date(year, month, day)
Expand Down Expand Up @@ -233,7 +233,7 @@ def calc_blr(xsqlda):
blr += [255, 76] # [blr_end, blr_eoc]

# x.sqlscale value shoud be negative, so b convert to range(0, 256)
return bytes([256 + b if b < 0 else b for b in blr])
return bytes(256 + b if b < 0 else b for b in blr)

def parse_select_items(buf, xsqlda, connection):
index = 0
Expand Down Expand Up @@ -470,7 +470,7 @@ def _fetch_generator(self, stmt_handle):
self.stmt_handle = h

raise StopIteration()

def fetchone(self):
try:
if PYTHON_MAJOR_VER==3:
Expand Down Expand Up @@ -606,7 +606,7 @@ def main_transaction(self):
if len(self._transactions):
return self._transactions[0]
return None

def commit(self, retaining=False):
if self.main_transaction:
self.main_transaction.commit(retaining=retaining)
Expand Down

0 comments on commit fcb167c

Please sign in to comment.