Pep8 check most files
I left some errors on puppetboard/forms.py because I'm not sure how to fix them.
This commit is contained in:
2
dev.py
2
dev.py
@@ -5,5 +5,5 @@ from puppetboard.app import app
|
||||
from puppetboard.default_settings import DEV_LISTEN_HOST, DEV_LISTEN_PORT
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.debug=True
|
||||
app.debug = True
|
||||
app.run(DEV_LISTEN_HOST, DEV_LISTEN_PORT)
|
||||
|
||||
@@ -14,7 +14,6 @@ logfilename = os.path.join('/tmp/', 'puppetboard_passenger_wsgi.log')
|
||||
logging.basicConfig(filename=logfilename, level=logging.INFO)
|
||||
|
||||
try:
|
||||
from puppetboard.app import app as application
|
||||
from puppetboard.app import app as application
|
||||
except Exception, inst:
|
||||
logging.exception("Error: %s", str(type(inst)))
|
||||
|
||||
logging.exception("Error: %s", str(type(inst)))
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
PUPPETDB_HOST='localhost'
|
||||
PUPPETDB_PORT=8080
|
||||
PUPPETDB_SSL=False
|
||||
PUPPETDB_KEY=None
|
||||
PUPPETDB_CERT=None
|
||||
PUPPETDB_TIMEOUT=20
|
||||
DEV_LISTEN_HOST='127.0.0.1'
|
||||
DEV_LISTEN_PORT=5000
|
||||
UNRESPONSIVE_HOURS=2
|
||||
ENABLE_QUERY=True
|
||||
LOGLEVEL='info'
|
||||
PUPPETDB_HOST = 'localhost'
|
||||
PUPPETDB_PORT = 8080
|
||||
PUPPETDB_SSL = False
|
||||
PUPPETDB_KEY = None
|
||||
PUPPETDB_CERT = None
|
||||
PUPPETDB_TIMEOUT = 20
|
||||
DEV_LISTEN_HOST = '127.0.0.1'
|
||||
DEV_LISTEN_PORT = 5000
|
||||
UNRESPONSIVE_HOURS = 2
|
||||
ENABLE_QUERY = True
|
||||
LOGLEVEL = 'info'
|
||||
|
||||
@@ -4,17 +4,17 @@ from __future__ import absolute_import
|
||||
from flask.ext.wtf import Form
|
||||
from wtforms import RadioField, TextAreaField, validators
|
||||
|
||||
|
||||
class QueryForm(Form):
|
||||
"""The form used to allow freeform queries to be executed against
|
||||
PuppetDB."""
|
||||
query = TextAreaField('Query', [validators.Required(
|
||||
message='A query is required.')])
|
||||
message='A query is required.')])
|
||||
endpoints = RadioField('API endpoint', choices = [
|
||||
('nodes', 'Nodes'),
|
||||
('resources', 'Resources'),
|
||||
('facts', 'Facts'),
|
||||
('fact-names', 'Fact Names'),
|
||||
('reports', 'Reports'),
|
||||
('events', 'Events'),
|
||||
])
|
||||
|
||||
('nodes', 'Nodes'),
|
||||
('resources', 'Resources'),
|
||||
('facts', 'Facts'),
|
||||
('fact-names', 'Fact Names'),
|
||||
('reports', 'Reports'),
|
||||
('events', 'Events'),
|
||||
])
|
||||
|
||||
@@ -6,6 +6,7 @@ from pypuppetdb.errors import EmptyResponseError
|
||||
|
||||
from flask import abort
|
||||
|
||||
|
||||
def get_or_abort(func, *args, **kwargs):
|
||||
"""Execute the function with its arguments and handle the possible
|
||||
errors that might occur.
|
||||
|
||||
Reference in New Issue
Block a user