Commit f592ee1c authored by Alexander's avatar Alexander

now fully backwards compatible with 2.7.10 as default on macOS...

parent 95803320
__author__ = 'Alexander L. de Goeij'
__version__ = '0.4.1'
__version__ = '0.4.2'
......@@ -31,12 +31,12 @@ import sys
import os
import logging
import argparse
import configparser
from configparser import MissingSectionHeaderError
from socket import gaierror
import urllib.request
import json
import pip
import configparser
from configparser import MissingSectionHeaderError
import requests
from qrmr import __version__
import colorlog
......@@ -74,11 +74,10 @@ def check_upgrade():
No pressure though.
"""
url = 'https://pypi.python.org/pypi/qrmr/json'
req = urllib.request.Request(url)
req = requests.get(url)
try:
res = urllib.request.urlopen(req).read()
response = json.loads(res.decode('utf-8'))
response = req.json()
logger.debug(response)
pypi_version = response["info"]["version"]
local_version = ""
......@@ -93,7 +92,7 @@ def check_upgrade():
if pypi_version > local_version:
logger.warning(
"Newer version of QRMR available (%s), strongly suggested to run `pip install -U qrmr`!")
"Newer version of QRMR available, strongly suggested to run `pip install -U qrmr`!")
elif pypi_version == local_version:
logger.info("You are running the latest version of QRMR.")
else:
......
......@@ -39,7 +39,8 @@ setup(
keywords="cloud aws cli login mfa otp session token",
url="https://gitlab.com/qrmr/qrmr",
packages=find_packages(),
install_requires=['future', 'colorlog', 'boto3'],
install_requires=['future', 'colorlog',
'boto3', 'configparser', 'requests'],
long_description=open('README.rst').read(),
classifiers=[
"Development Status :: 3 - Alpha",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment