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

Fixed URL parse error when using GitHub Enterprise #284

Merged
merged 1 commit into from Dec 15, 2014

Conversation

Projects
None yet
2 participants
@major
Contributor

major commented Dec 15, 2014

GitHub Enterprise deployments are a little unpredictable and this patch removes an error when using mkdocs gh-deploy. It also includes a few PEP8 cleanups.

@d0ugal

This comment has been minimized.

Member

d0ugal commented Dec 15, 2014

Thanks - what is the error that you get? I'd much rather this PR didn't wrap to 80 chars, it just hides your fix. We check for other PEP8 errors but not that one, so it doesn't help us.

Fixed URL parse error when using GitHub Enterprise
GitHub Enterprise deployments are a little unpredictable and this patch removes an error when using `mkdocs gh-deploy`.  It also includes a few PEP8 cleanups.

@major major force-pushed the major:ghdeploy-github-enterprise-fix branch from a28b64d to 9176d9a Dec 15, 2014

@major

This comment has been minimized.

Contributor

major commented Dec 15, 2014

@d0ugal I removed the PEP8 fixes (sorry, it's a habit!). Here's the error I get:

$ mkdocs gh-deploy                                                                                     [master]
Building documentation to directory: site
Directory site contains stale files. Use --clean to remove them.
Copying 'site' to `gh-pages` branch and pushing to GitHub.
Counting objects: 1, done.
Writing objects: 100% (1/1), 198 bytes | 0 bytes/s, done.
Total 1 (delta 0), reused 1 (delta 0)
To git@[hostname]:[username]/[repo_name].git
   5862b07..3afcc78  gh-pages -> gh-pages
Traceback (most recent call last):
  File "/usr/local/bin/mkdocs", line 9, in <module>
    load_entry_point('mkdocs==0.11.1', 'console_scripts', 'mkdocs')()
  File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mkdocs-0.11.1-py2.7.egg/mkdocs/main.py", line 62, in run_main
    main(cmd, args=sys.argv[2:], options=dict(opts))
  File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mkdocs-0.11.1-py2.7.egg/mkdocs/main.py", line 44, in main
    gh_deploy(config)
  File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mkdocs-0.11.1-py2.7.egg/mkdocs/gh_deploy.py", line 23, in gh_deploy
    host, path = url.split('github.com:', 1)
ValueError: need more than 1 value to unpack

My company's GitHub Enterprise installation doesn't contain github.com in the URL and it causes the split to break.

@d0ugal

This comment has been minimized.

Member

d0ugal commented Dec 15, 2014

PEP8 changes are a habit for me too, I'd probably enforce 80 chars, but that should all be done in one go... and I don't think Tom would agree ;)

Anyway, that is really useful thanks. Looks good to me, but will fully read shortly.

d0ugal added a commit that referenced this pull request Dec 15, 2014

Merge pull request #284 from major/ghdeploy-github-enterprise-fix
Fixed URL parse error when using GitHub Enterprise

@d0ugal d0ugal merged commit 97df1c0 into mkdocs:master Dec 15, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
@d0ugal

This comment has been minimized.

Member

d0ugal commented Dec 15, 2014

Thanks!

@d0ugal d0ugal added this to the 0.12.0 milestone Dec 15, 2014

@d0ugal d0ugal added the Bug label Dec 15, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment