remove some stray prints
This commit is contained in:
Родитель
69c3570c4b
Коммит
bccd75edf4
|
@ -44,9 +44,6 @@ The 'send' namespace is used to send updates to our supported services.
|
|||
username = request.POST.get('username')
|
||||
shorturl = request.POST.get('shorturl')
|
||||
userid = request.POST.get('userid')
|
||||
print "domain", domain
|
||||
print "userid", userid
|
||||
print "shorturl", shorturl
|
||||
to = request.POST.get('to')
|
||||
if not domain or not message:
|
||||
error = {
|
||||
|
@ -72,7 +69,6 @@ The 'send' namespace is used to send updates to our supported services.
|
|||
if userid:
|
||||
q = q.filter(Account.userid==userid)
|
||||
acct = q.one()
|
||||
print >> sys.stderr, acct.to_dict()
|
||||
except MultipleResultsFound:
|
||||
error = {'provider': domain,
|
||||
'reason': "Multiple accounts for %s were found, username or userid required" % domain,
|
||||
|
@ -101,14 +97,12 @@ The 'send' namespace is used to send updates to our supported services.
|
|||
for key, val in request.POST.items():
|
||||
setattr(history, key, val)
|
||||
Session.add(history)
|
||||
print "ABOUT TO SIGN!"
|
||||
link = sign_link(shorturl, acct.username)
|
||||
Session.commit()
|
||||
result['linkdrop'] = history.id
|
||||
result['shorturl'] = shorturl
|
||||
result['from'] = userid
|
||||
result['to'] = to
|
||||
print >> sys.stderr, result
|
||||
log.info("send success - linkdrop id is %s", history.id)
|
||||
# no redirects requests, just return the response.
|
||||
return {'result': result, 'error': error}
|
||||
|
|
|
@ -5,7 +5,6 @@ from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound
|
|||
def sign_link(shorturl, author):
|
||||
link = Session.query(Link).filter_by(short_url=shorturl).first()
|
||||
if link is None:
|
||||
print "FAILURE TO SIGN"
|
||||
return {'error': "Couldn't find that short URL"}
|
||||
|
||||
print "XXXXXXXXXXX signing: ", shorturl, author
|
||||
|
|
Загрузка…
Ссылка в новой задаче