summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorying.yunlong <ying.yunlong@zte.com.cn>2018-03-02 15:50:00 +0800
committeryunlong ying <ying.yunlong@zte.com.cn>2018-03-03 03:59:33 +0000
commitb6eb454c104d664517622807dd4f01403e88e1cd (patch)
tree2e1b7ff66bd4d52c8019a6545f51109dfbe98a2d
parent838f2ded9478ae140545fcdceb4cc10d73a2c92b (diff)
Replace vnflcm mysql connector with PyMySQL.
Change-Id: I8001ed03234a19ac549c2533bff0c2aff9434fe4 Issue-ID: VFC-786 Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
-rw-r--r--lcm/lcm/__init__.py3
-rw-r--r--lcm/requirements.txt2
2 files changed, 4 insertions, 1 deletions
diff --git a/lcm/lcm/__init__.py b/lcm/lcm/__init__.py
index c7b6818e..68cf9541 100644
--- a/lcm/lcm/__init__.py
+++ b/lcm/lcm/__init__.py
@@ -11,3 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+import pymysql
+
+pymysql.install_as_MySQLdb()
diff --git a/lcm/requirements.txt b/lcm/requirements.txt
index 07ea5669..b20fefcb 100644
--- a/lcm/requirements.txt
+++ b/lcm/requirements.txt
@@ -3,7 +3,7 @@ Django==1.11.9
djangorestframework==3.7.7
# for access MySQL
-MySQL-python==1.2.5
+PyMySQL==0.7.11
# redis cache
redis==2.10.5