Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Correct str.replace argument order
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jul 24, 2015
1 parent 14734f6 commit 8151c2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions nikola/plugins/command/install_theme.py
Expand Up @@ -100,7 +100,7 @@ def _execute(self, options, args):
except requests.exceptions.SSLError:
LOGGER.warning("SSL error, using http instead of https (press ^C to abort)")
time.sleep(1)
url = url.replace('http', 'https', 1)
url = url.replace('https', 'http', 1)
data = requests.get(url).json()
if listing:
print("Themes:")
Expand Down Expand Up @@ -136,7 +136,7 @@ def do_install(self, name, data):
except requests.exceptions.SSLError:
LOGGER.warning("SSL error, using http instead of https (press ^C to abort)")
time.sleep(1)
url = url.replace('http', 'https', 1)
url = url.replace('https', 'http', 1)
zip_data = requests.get(url).content

zip_file = io.BytesIO()
Expand Down
4 changes: 2 additions & 2 deletions nikola/plugins/command/plugin.py
Expand Up @@ -217,7 +217,7 @@ def do_install(self, url, name, show_install_notes=True):
except requests.exceptions.SSLError:
LOGGER.warning("SSL error, using http instead of https (press ^C to abort)")
time.sleep(1)
url = url.replace('http', 'https', 1)
url = url.replace('https', 'http', 1)
zip_data = requests.get(url).content

zip_file = io.BytesIO()
Expand Down Expand Up @@ -311,6 +311,6 @@ def get_json(self, url):
except requests.exceptions.SSLError:
LOGGER.warning("SSL error, using http instead of https (press ^C to abort)")
time.sleep(1)
url = url.replace('http', 'https', 1)
url = url.replace('https', 'http', 1)
self.json = requests.get(url).json()
return self.json

0 comments on commit 8151c2d

Please sign in to comment.