Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
6e4473fa
Unverified
Commit
6e4473fa
authored
Sep 18, 2018
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix self:update command
parent
a05a1a86
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
poetry/console/commands/self/update.py
+7
-3
No files found.
poetry/console/commands/self/update.py
View file @
6e4473fa
...
@@ -27,7 +27,7 @@ class SelfUpdateCommand(Command):
...
@@ -27,7 +27,7 @@ class SelfUpdateCommand(Command):
{ --preview : Install prereleases. }
{ --preview : Install prereleases. }
"""
"""
BASE_URL
=
"https://
poetry.eustace.io
"
BASE_URL
=
"https://
github.com/sdispater/poetry/releases/download/
"
@property
@property
def
home
(
self
):
def
home
(
self
):
...
@@ -155,7 +155,11 @@ class SelfUpdateCommand(Command):
...
@@ -155,7 +155,11 @@ class SelfUpdateCommand(Command):
def
_update
(
self
,
version
):
def
_update
(
self
,
version
):
from
poetry.utils.helpers
import
temporary_directory
from
poetry.utils.helpers
import
temporary_directory
checksum
=
"poetry-{}-{}.sha256sum"
.
format
(
version
,
sys
.
platform
)
platform
=
sys
.
platform
if
platform
==
"linux2"
:
platform
=
"linux"
checksum
=
"poetry-{}-{}.sha256sum"
.
format
(
version
,
platform
)
try
:
try
:
r
=
urlopen
(
self
.
BASE_URL
+
"/releases/{}"
.
format
(
checksum
))
r
=
urlopen
(
self
.
BASE_URL
+
"/releases/{}"
.
format
(
checksum
))
...
@@ -168,7 +172,7 @@ class SelfUpdateCommand(Command):
...
@@ -168,7 +172,7 @@ class SelfUpdateCommand(Command):
checksum
=
r
.
read
()
.
decode
()
checksum
=
r
.
read
()
.
decode
()
# We get the payload from the remote host
# We get the payload from the remote host
name
=
"poetry-{}-{}.tar.gz"
.
format
(
version
,
sys
.
platform
)
name
=
"poetry-{}-{}.tar.gz"
.
format
(
version
,
platform
)
try
:
try
:
r
=
urlopen
(
self
.
BASE_URL
+
"/releases/{}"
.
format
(
name
))
r
=
urlopen
(
self
.
BASE_URL
+
"/releases/{}"
.
format
(
name
))
except
HTTPError
as
e
:
except
HTTPError
as
e
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment