summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Fedoseev <fedoseev.sergey@gmail.com>2017-07-14 19:14:21 +0600
committerTim Graham <timograham@gmail.com>2017-07-14 09:14:21 -0400
commitfc2dee6908dee70c98453b109180831baac4d9da (patch)
treee825aed3d5f162a914f73d9f8bf61fe5df9cbf21
parent18db55bb31d8dffffd94af2f553eb4e982cd9785 (diff)
Removed unused branch in __getattr__() of Oracle and MySQL cursor wrappers.
-rw-r--r--django/db/backends/mysql/base.py5
-rw-r--r--django/db/backends/oracle/base.py5
2 files changed, 2 insertions, 8 deletions
diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py
index 35cc7dfc04..27e424f12b 100644
--- a/django/db/backends/mysql/base.py
+++ b/django/db/backends/mysql/base.py
@@ -84,10 +84,7 @@ class CursorWrapper:
raise
def __getattr__(self, attr):
- if attr in self.__dict__:
- return self.__dict__[attr]
- else:
- return getattr(self.cursor, attr)
+ return getattr(self.cursor, attr)
def __iter__(self):
return iter(self.cursor)
diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py
index 224b3ae0ff..56710fcc1f 100644
--- a/django/db/backends/oracle/base.py
+++ b/django/db/backends/oracle/base.py
@@ -518,10 +518,7 @@ class FormatStylePlaceholderCursor:
return VariableWrapper(self.cursor.arrayvar(*args))
def __getattr__(self, attr):
- if attr in self.__dict__:
- return self.__dict__[attr]
- else:
- return getattr(self.cursor, attr)
+ return getattr(self.cursor, attr)
def __iter__(self):
return (_rowfactory(r, self.cursor) for r in self.cursor)