fix some cli bugs, update manifest, Fix #29

This commit is contained in:
Matthew Scragg 2014-10-17 12:03:38 -05:00
parent 3be7ad1ab6
commit 2e38c6a34c
7 changed files with 26 additions and 28 deletions

View file

@ -4,6 +4,7 @@ import hashlib
import json
import string
import random
import sys
from jinja2 import Template
@ -99,6 +100,15 @@ def to_canonical(s):
def gravatar_url(email):
return "//www.gravatar.com/avatar/" + hashlib.md5(email).hexdigest()
def in_virtualenv():
return hasattr(sys, 'real_prefix')
def is_su():
return os.geteuid() == 0
def upstart_script(user='root', app_dir=None, port=5000, workers=2, path=None):
script = """
limit nofile 65335 65335