Ejemplo n.º 1
0
 def _check_new(self):
     try:
         req = requests.get('http://www.tgxnet.no/cc-ver.json', timeout=1.0)
         req.raise_for_status()
         verinfo = req.json()
     except (requests.exceptions.RequestException):
         return
     running = StrictVersion(__init__.__version__)
     print(__init__.__version__)
     newest = StrictVersion(verinfo['currentVersion'])
     if newest > running:
         inf = AboutDialog()
         text = "You are running version {} of ConsumerCheck, version {} is now available.".format(
             running, newest)
         inf.information(text, title='New version')