Fix prepare-dev.py hook installation on Python 3

Review Request #10680 — Created Sept. 5, 2019 and submitted — Latest diff uploaded

Information

Review Board
master
9f69293...

Reviewers

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 in os.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 of six, so we determine the correct string type
manually.

Ran prepare-dev.py under Python 2 and Python 3 and it created git
hooks successfully.

reviewboard/static/rb/css/pages/admin/security-center.less
reviewboard/static/rb/css/pages/admin/webhooks.less
reviewboard/static/rb/css/pages/admin/widgets.less
reviewboard/static/rb/css/ui/boxes.less
reviewboard/static/rb/css/ui/colors.less
reviewboard/static/rb/css/ui/datagrids.less
reviewboard/static/rb/css/ui/responsive.less
reviewboard/static/rb/css/ui/sidebars.less
reviewboard/static/rb/js/newReviewRequest/views/newReviewRequestView.es6.js
reviewboard/static/rb/js/views/headerView.es6.js
reviewboard/templates/base.html
reviewboard/templates/admin/base_site.html
reviewboard/templates/admin/login.html
reviewboard/templates/datagrids/datagrid.html
reviewboard/templates/reviews/reviewable_base.html
reviewboard/templates/reviews/ui/base.html
This diff has been split across 2 pages: < 1 2
Loading...