Skip to content
Merged
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
4 changes: 2 additions & 2 deletions cmds/cmd_package/cmd_package_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ def get_url_from_mirror_server(package_name, package_version):
"""Get the download address from the mirror server based on the package name."""

try:
if isinstance(package_name, str):
if type(package_name) == bytes:
if sys.version_info < (3, 0):
package_name = str(package_name)
else:
package_name = str(package_name)[2:-1]
package_name = str(package_name, encoding='utf-8')
except Exception as e:
print('Error message:%s' % e)
print("\nThe mirror server could not be contacted. Please check your network connection.")
Expand Down