Eh, cleanup, pep8 and stuff

This commit is contained in:
Milan Toman
2018-07-15 01:02:05 +02:00
parent 1f5d741d18
commit b2a368e14d
2 changed files with 64 additions and 61 deletions

View File

@@ -1,10 +1,19 @@
#!/usr/bin/python3
"""Our cherrypy server, it all starts here
Let's look at the statically linked stuff as well (i.e. the files that will
serve us data). These imports are static files in the same directory. Each
a spearate application with it's own face and behavior
"""
import os
import cherrypy
import OpenSSL
import sys
# UI for weather ./weather.py
import weather
# CSV "API" for graphs, or individual pulling ./dynamic.py
import dynamic
# UI for RasPi / davis status ./status.py
import status
PATH = os.path.abspath(os.path.dirname(__file__))
@@ -15,19 +24,8 @@ sys.path.append(_SCRIPT_PATH)
# Certificates reside here
_CERT_PATH = _SCRIPT_PATH + '/.cert'
"""Let's look at the statically linked stuff (i.e. the files that will
serve us data). These imports are static files in the same directory. Each
a spearate application with it's own face and behavior
"""
# UI for weather ./weather.py
import weather
# CSV "API" for graphs, or individual pulling ./dynamic.py
import dynamic
# UI for RasPi / davis status ./status.py
import status
#basic config for the server, the SSL part is questionable...
server_config={
# basic config for the server, the SSL part is questionable...
server_config = {
'server.socket_host': '0.0.0.0',
'server.socket_port': 443,
'server.ssl_module': 'builtin',