Changeset - bd720d050d68
[Not reviewed]
Bradley M. Kuhn - 11 years ago 2014-07-03 01:05:36
bkuhn@sfconservancy.org
Rename RC_SCM_DATA to KALLITHEA_EXTRAS
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/utils2.py
Show inline comments
 
@@ -612,13 +612,13 @@ def _extract_extras(env=None):
 
    AttributeDict object
 
    """
 
    if not env:
 
        env = os.environ
 

	
 
    try:
 
        rc_extras = json.loads(env['RC_SCM_DATA'])
 
        rc_extras = json.loads(env['KALLITHEA_EXTRAS'])
 
    except Exception:
 
        print os.environ
 
        print >> sys.stderr, traceback.format_exc()
 
        rc_extras = {}
 

	
 
    try:
 
@@ -629,13 +629,13 @@ def _extract_extras(env=None):
 
        raise Exception('Missing key %s in os.environ %s' % (e, rc_extras))
 

	
 
    return AttributeDict(rc_extras)
 

	
 

	
 
def _set_extras(extras):
 
    os.environ['RC_SCM_DATA'] = json.dumps(extras)
 
    os.environ['KALLITHEA_EXTRAS'] = json.dumps(extras)
 

	
 

	
 
def unique_id(hexlen=32):
 
    alphabet = "23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghjklmnpqrstuvwxyz"
 
    return suuid(truncate_to=hexlen, alphabet=alphabet)
 

	
0 comments (0 inline, 0 general)