Fix prepare-dev.py hook installation on Python 3
Review Request #10680 — Created Sept. 5, 2019 and submitted — Latest diff uploaded
There were two issues in the implementation of
install_git_hooks
that
prevented it from working on Python 3:
- an old-style (0777) octal literal was used instead of a new-style one
(0o777): old-style literals are not supported on Python 3; and
- bytes and unicode were being mixed inos.path.join
, which is not an
issue in Python 2 but is on Python 3.Since
prepare-dev.py
is intended to install dependencies, we can't
assume the presence ofsix
, so we determine the correct string type
manually.
Ran prepare-dev.py under Python 2 and Python 3 and it created git
hooks successfully.
Diff Revision 4
This is not the most recent revision of the diff. The latest diff is revision 7. See what's changed.
contrib/internal/build-media.py |
---|
contrib/internal/prepare-dev.py |
---|
reviewboard/dependencies.py |
---|
reviewboard/staticbundles.py |
---|
reviewboard/admin/security_checks.py |
---|
reviewboard/static/lib/js/csshover2.htc |
---|
reviewboard/static/lib/js/pngfix.htc |
---|
reviewboard/static/rb/css/defs.less |
---|
reviewboard/static/rb/css/mixins/style.less |
---|
reviewboard/static/rb/css/pages/admin/django.less |
---|
reviewboard/static/rb/css/pages/admin/dashboard.less |
---|
reviewboard/static/rb/css/pages/admin/integrations.less |
---|
reviewboard/static/rb/css/pages/base.less |
---|
reviewboard/static/rb/css/pages/admin/auth.less |
---|
reviewboard/static/rb/css/pages/admin/defs.less |
---|
reviewboard/static/rb/css/pages/admin/extensions.less |
---|
reviewboard/static/rb/css/pages/admin/filediffs.less |
---|
reviewboard/static/rb/css/pages/admin/log-viewer.less |
---|
reviewboard/static/rb/css/pages/admin/oauth2.less |
---|
reviewboard/static/rb/css/pages/admin/repositories.less |
---|