Skip to content

Commit

Permalink
Merge pull request #11 from danielrichman/master
Browse files Browse the repository at this point in the history
Allow unicode in HTML_DESCRIPTION, add email error logging
  • Loading branch information
adamgreig committed Dec 27, 2012
2 parents d7c0e75 + be1a4b0 commit 71396c8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
9 changes: 7 additions & 2 deletions habitat.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
couch_uri: "http://localhost:5984"
couch_db: habitat
log_stderr_level: DEBUG
log_file_level: NONE
log_levels:
stderr: NONE
file: NONE
email: NONE
spacenearus:
log_file:
tracker: "http://habhub.org/tracker/track.php?{0}"
transition_app:
log_file:
5 changes: 3 additions & 2 deletions habitat_transition/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from xml.sax.saxutils import escape as htmlescape
from habitat import uploader
from . import couch_to_xml
from habitat.utils.startup import load_config
from habitat.utils.startup import load_config, setup_logging

# Monkey patch float precision
json.encoder.FLOAT_REPR = lambda o: format(o, '.5f')
Expand All @@ -41,6 +41,7 @@
# N.B.: Searches working directory since it won't be specified in argv.
# Configure uwsgi appropriately.
config = load_config()
setup_logging(config, "transition_app")
couch_settings = {"couch_uri": config["couch_uri"],
"couch_db": config["couch_db"]}

Expand Down Expand Up @@ -168,7 +169,7 @@ def set_expires(response, diff):

response.headers["Expires"] = expires

HTML_DESCRIPTION = """
HTML_DESCRIPTION = u"""
<font size="-2"><BR>
<B>Radio: </B>{radio_safe}<BR>
<B>Antenna: </B>{antenna_safe}<BR>
Expand Down

0 comments on commit 71396c8

Please sign in to comment.