Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python 3 fixes #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions resweb/core.py
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ def authenticate():
def requires_auth(f):
@wraps(f)
def decorated(*args, **kwargs):
print app.config.get('BASIC_AUTH')
print(app.config.get('BASIC_AUTH'))
auth = request.authorization
if app.config.get('BASIC_AUTH') and (not auth or not check_auth(auth.username, auth.password)):
return authenticate()
@@ -192,7 +192,7 @@ def worker(worker_id):
'resweb_version': view_worker.resweb_version(),
'address': view_worker.address()
}
print data
print(data)
return render_template('worker.html', data=data)

@app.route('/workers/')
@@ -207,7 +207,7 @@ def workers():
'resweb_version': view_workers.resweb_version(),
'address': view_workers.address()
}
print data
print(data)
return render_template('workers.html', data=data)

@app.route('/stats/')
@@ -228,7 +228,7 @@ def stats(key):
'resweb_version': view_stats.resweb_version(),
'address': view_stats.address()
}
print data
print(data)
return render_template('stats.html', data=data)

@app.route('/stat/<stat_id>/')
@@ -245,7 +245,7 @@ def stat(stat_id):
'resweb_version': view_stat.resweb_version(),
'address': view_stat.address()
}
print data
print(data)
return render_template('stat.html', data=data)

@app.route('/delayed/')
@@ -262,7 +262,7 @@ def delayed():
'resweb_version': view_delayed.resweb_version(),
'address': view_delayed.address()
}
print data
print(data)
return render_template('delayed.html', data=data)

@app.route('/delayed/<timestamp>/')
@@ -280,7 +280,7 @@ def delayed_timestamp(timestamp):
'resweb_version': view_dt.resweb_version(),
'address': view_dt.address()
}
print data
print(data)
return render_template('delayed_timestamp.html', data=data)

def main():
3 changes: 2 additions & 1 deletion resweb/views.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import division
from pyres import __version__
from resweb import __version__ as res_version
from pyres.worker import Worker as Wrkr
@@ -30,7 +31,7 @@ def resweb_version(self):
def pages(self, start, size, link_function, width=20):
pages = []

num_pages = size / width
num_pages = size // width
if size % width > 0:
num_pages += 1