Skip to content

Commit

Permalink
Small PEP8 Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
super3 committed Sep 21, 2015
1 parent 7b0982f commit aef52ff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
4 changes: 3 additions & 1 deletion dataserv/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def online_farmers():
# give us all farmers that have been around for the past online_time
q = db.session.query(Farmer)
q = q.filter(Farmer.last_seen > time_ago)
q = q.order_by(desc(Farmer.height),Farmer.id)
q = q.order_by(desc(Farmer.height), Farmer.id)
return q.all()


Expand Down Expand Up @@ -90,8 +90,10 @@ def ping(btc_addr):
error_msg = "Ping Failed: {0}"
try:
user = Farmer(btc_addr)

def before_commit(): # lazy authentication
user.authenticate(dict(request.headers))

user.ping(before_commit_callback=before_commit)
return make_response("Ping accepted.", 200)
except ValueError:
Expand Down
1 change: 0 additions & 1 deletion dataserv/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import logging



ONLINE_TIME = 5 # minutes


Expand Down
1 change: 0 additions & 1 deletion tests/test_App.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ def test_ping_invalid_address(self):
self.assertEqual(rv.status_code, 400)



class OnlineTest(TemplateTest):

def test_online(self):
Expand Down

0 comments on commit aef52ff

Please sign in to comment.