Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions rsconnect/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def test_server(connect_server):
key = connect_server.api_key
insecure = connect_server.insecure
ca_data = connect_server.ca_data
failures = ["Invalid server URL: %s" % url]
failures = []
for test in _to_server_check_list(url):
try:
connect_server = api.RSConnectServer(test, key, insecure, ca_data)
Expand All @@ -198,8 +198,8 @@ def test_server(connect_server):
failures.append(" %s - failed to verify as RStudio Connect." % test)

# In case the user may need https instead of http...
if len(failures) == 2 and url.startswith("http://"):
failures.append(' Do you need to use "https://%s?"' % url[7:])
if len(failures) == 1 and url.startswith("http://"):
failures.append(' Do you need to use "https://%s"?' % url[7:])

# If we're here, nothing worked.
raise api.RSConnectException("\n".join(failures))
Expand Down
2 changes: 1 addition & 1 deletion rsconnect/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def handle_bad_response(self, response):
error = "The Connect server reported an error: %s" % response.json_data["error"]
raise RSConnectException(error)
raise RSConnectException(
"Received and unexpected response from RStudio Connect: %s %s" % (response.status, response.reason)
"Received an unexpected response from RStudio Connect: %s %s" % (response.status, response.reason)
)


Expand Down
6 changes: 3 additions & 3 deletions rsconnect/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ def detect_environment(dirname, force_generate=False, conda_mode=False, conda=No

if result is not None:
if conda_mode and result["package_manager"] != "conda":
return {
"error": 'Conda was requested but no activated Conda environment was found. See "conda activate '
return Environment(
error='Conda was requested but no activated Conda environment was found. See "conda activate '
'--help" for more information.'
}
)

result["python"] = get_python_version(Environment(**result))
result["pip"] = get_version("pip")
Expand Down