Revision 0308f3a7 snf-common/synnefo/lib/astakos.py

b/snf-common/synnefo/lib/astakos.py
110 110
        override_users={}):
111 111
    if override_users:
112 112
        return uuid
113

  
114
    headers = {}
115
    if uuid:
116
        headers['X-User-Uuid'] = uuid
117

  
113 118
    try:
114
        data = call(token, url, {'X-User-Uuid': uuid})
119
        data = call(token, url, headers)
115 120
    except Exception, e:
116 121
        raise e
117 122
    else:
......
126 131
        override_users={}):
127 132
    if override_users:
128 133
        return username
134

  
135
    headers = {}
136
    if username:
137
        headers['X-User-Username'] = username
129 138
    try:
130
        data = call(token, url, {'X-User-Username': username})
139
        data = call(token, url, headers)
131 140
    except Exception, e:
132 141
        raise e
133 142
    else:

Also available in: Unified diff