Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

collect str type check

  • Loading branch information...
commit b76ff86cf3e12e187d7089ba023d1f22b4a3d7ba 1 parent eef1ab7
@nakagami authored
Showing with 2 additions and 4 deletions.
  1. +2 −4 firebirdsql/fbcore.py
View
6 firebirdsql/fbcore.py
@@ -402,8 +402,7 @@ def execute(self, query, params = []):
cooked_params = []
for param in params: # Convert str/bytes parameter to blob id
- if ((PYTHON_MAJOR_VER==3 and type(param) == str) or
- (PYTHON_MAJOR_VER==2 and type(param) == unicode)):
+ if type(param) == str:
param = self.connection.str_to_bytes(param)
elif ((PYTHON_MAJOR_VER==3 and type(param) != bytes) or
(PYTHON_MAJOR_VER==2 and type(param) != str)):
@@ -666,8 +665,7 @@ def params_to_blr(self, params):
values = bs([])
for p in params:
t = type(p)
- if ((PYTHON_MAJOR_VER==3 and t == str) or
- (PYTHON_MAJOR_VER==2 and t == unicode)):
+ if t == str:
v = self.str_to_bytes(p)
nbytes = len(v)
pad_length = ((4-nbytes) & 3)
Please sign in to comment.
Something went wrong with that request. Please try again.