Skip to content
Permalink
Browse files

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 8151c2d766f185fe08fe5ba11175343435335c82
Showing with 4 additions and 4 deletions.
  1. +2 −2 nikola/plugins/command/install_theme.py
  2. +2 −2 nikola/plugins/command/plugin.py
@@ -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:")
@@ -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()
@@ -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()
@@ -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.
You can’t perform that action at this time.