Skip to content

Commit

Permalink
Fixed some Python3-related bugs introduced by a pull request a while …
Browse files Browse the repository at this point in the history
…back.
  • Loading branch information
liftoff committed May 20, 2016
1 parent 1d0e803 commit 13e1825
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 17 deletions.
2 changes: 1 addition & 1 deletion gateone/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
__version_info__ = (1, 2, 0)
__license__ = "AGPLv3" # ...or proprietary (see LICENSE.txt)
__author__ = 'Dan McDougall <[email protected]>'
__commit__ = "20151116212858" # Gets replaced by git (holds the date/time)
__commit__ = "20151122132622" # Gets replaced by git (holds the date/time)

import os
GATEONE_DIR = os.path.dirname(os.path.abspath(__file__))
Expand Down
16 changes: 8 additions & 8 deletions gateone/auth/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ def get(self):
url_prefix=self.settings['url_prefix'])
check = self.get_argument("check", None)
if check:
self.set_header ('Access-Control-Allow-Origin', '*')
self.set_header('Access-Control-Allow-Origin', '*')
user = self.get_current_user()
if user:
logging.debug('CASAuthHandler: user is authenticated')
Expand Down Expand Up @@ -645,9 +645,9 @@ def authenticate_redirect(self, callback=None):
cas_server += '/'
service_url = "%sauth" % self.base_url
next_url = self.get_argument('next', None)
next_param = ""
if next_url:
next_param = "?next=" + quote(next_url)
next_param = ""
if next_url:
next_param = "?next=" + quote(next_url)
redirect_url = '%slogin?service=%s%s' % (cas_server, quote(service_url), quote(next_param))
logging.debug("Redirecting to CAS URL: %s" % redirect_url)
self.redirect(redirect_url)
Expand All @@ -671,15 +671,15 @@ def get_authenticated_user(self, server_ticket):
if cas_version == 1:
validate_suffix = 'validate'
next_url = self.get_argument('next', None)
next_param = ""
if next_url:
next_param = "?next=" + quote(next_url)
next_param = ""
if next_url:
next_param = "?next=" + quote(next_url)
validate_url = (
cas_server +
validate_suffix +
'?service=' +
quote(service_url) +
quote(next_param) +
quote(next_param) +
'&ticket=' +
quote(server_ticket)
)
Expand Down
2 changes: 1 addition & 1 deletion gateone/core/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}
}
__author__ = 'Dan McDougall <[email protected]>'
__commit__ = "20151116212858" # Gets replaced by git (holds the date/time)
__commit__ = "20151122132622" # Gets replaced by git (holds the date/time)

# NOTE: Docstring includes reStructuredText markup for use with Sphinx.
__doc__ = '''\
Expand Down
2 changes: 1 addition & 1 deletion gateone/static/gateone.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions terminal/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,6 @@
logging.error(
"...or download it from http://pypi.python.org/pypi/ordereddict")
sys.exit(1)
try:
from itertools import imap, izip
except ImportError: # Python 3 doesn't have imap or izip in itertool
imap = map
izip = zip
try:
xrange = xrange
except NameError: # Python 3 doesn't have xrange()
Expand Down Expand Up @@ -3716,7 +3711,10 @@ def cursor_position(self, coordinates):
:coordinates: Should be something like, 'row;col' (1-based) but, 'row', 'row;', and ';col' are also valid (assumes 1 on missing value).
.. note:: If coordinates is '' (an empty string), the cursor will be moved to the top left (1;1).
.. note::
If coordinates is '' (an empty string), the cursor will be moved to
the top left (1;1).
"""
# NOTE: Since this is 1-based we have to subtract 1 from everything to
# match how we store these values internally.
Expand Down

0 comments on commit 13e1825

Please sign in to comment.