Skip to content

Commit 8151c2d

Browse files
committedJul 24, 2015
Correct str.replace argument order
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
1 parent 14734f6 commit 8151c2d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎nikola/plugins/command/install_theme.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def _execute(self, options, args):
100100
except requests.exceptions.SSLError:
101101
LOGGER.warning("SSL error, using http instead of https (press ^C to abort)")
102102
time.sleep(1)
103-
url = url.replace('http', 'https', 1)
103+
url = url.replace('https', 'http', 1)
104104
data = requests.get(url).json()
105105
if listing:
106106
print("Themes:")
@@ -136,7 +136,7 @@ def do_install(self, name, data):
136136
except requests.exceptions.SSLError:
137137
LOGGER.warning("SSL error, using http instead of https (press ^C to abort)")
138138
time.sleep(1)
139-
url = url.replace('http', 'https', 1)
139+
url = url.replace('https', 'http', 1)
140140
zip_data = requests.get(url).content
141141

142142
zip_file = io.BytesIO()

‎nikola/plugins/command/plugin.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def do_install(self, url, name, show_install_notes=True):
217217
except requests.exceptions.SSLError:
218218
LOGGER.warning("SSL error, using http instead of https (press ^C to abort)")
219219
time.sleep(1)
220-
url = url.replace('http', 'https', 1)
220+
url = url.replace('https', 'http', 1)
221221
zip_data = requests.get(url).content
222222

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

0 commit comments

Comments
 (0)
Please sign in to comment.