Skip to content

Commit

Permalink
pylint cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Smith committed Apr 2, 2015
1 parent 20dd199 commit 05acbc6
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions applications/endpointtracker/aci-endpoint-tracker-gui.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
from flask import Flask
import mysql.connector
try:
import mysql.connector as mysql
except ImportError:
import pymysql as mysql
from acitoolkit.acitoolkit import Credentials

def populate_data(mysql_ip, mysql_username, mysql_password):
# Create the MySQL database
cnx = mysql.connector.connect(user=mysql_username, password=mysql_password,
host=mysql_ip,
database='acitoolkit')
cnx = mysql.connect(user=mysql_username, password=mysql_password,
host=mysql_ip,
database='acitoolkit')
c = cnx.cursor()
c.execute('USE acitoolkit;')
c.execute('SELECT * FROM endpoints;')
Expand All @@ -28,7 +31,6 @@ def populate_data(mysql_ip, mysql_username, mysql_password):

app = Flask(__name__)


@app.route('/')
def hello_world():
return """
Expand Down Expand Up @@ -127,7 +129,8 @@ def hello_world():

# Take login credentials from the command line if provided
# Otherwise, take them from your environment variables file ~/.profile
description = 'Simple application that logs on to the APIC and displays all of the Endpoints.'
description = ('Simple application that logs on to the APIC '
'and displays all of the Endpoints.')
creds = Credentials('mysql', description)
args = creds.get()

Expand Down

0 comments on commit 05acbc6

Please sign in to comment.