1275 if not zipfile.is_zipfile(archive): |
1275 if not zipfile.is_zipfile(archive): |
1276 self.__updateAvailable = True |
1276 self.__updateAvailable = True |
1277 return |
1277 return |
1278 |
1278 |
1279 # 3. Check the version of the archive file |
1279 # 3. Check the version of the archive file |
1280 zip = zipfile.ZipFile(archive, "r") |
1280 zipFile = zipfile.ZipFile(archive, "r") |
1281 try: |
1281 try: |
1282 aversion = zip.read("VERSION").decode("utf-8") |
1282 aversion = zipFile.read("VERSION").decode("utf-8") |
1283 except KeyError: |
1283 except KeyError: |
1284 aversion = "" |
1284 aversion = "" |
1285 zip.close() |
1285 zipFile.close() |
1286 |
1286 |
1287 if aversion != version: |
1287 if aversion != version: |
1288 self.__updateAvailable = True |
1288 self.__updateAvailable = True |
1289 |
1289 |
1290 def __sslErrors(self, reply, errors): |
1290 def __sslErrors(self, reply, errors): |