628 |
628 |
629 # check, if the archive is a valid zip file |
629 # check, if the archive is a valid zip file |
630 if not zipfile.is_zipfile(archive): |
630 if not zipfile.is_zipfile(archive): |
631 return PluginRepositoryWidget.PluginStatusRemoteUpdate |
631 return PluginRepositoryWidget.PluginStatusRemoteUpdate |
632 |
632 |
633 zip = zipfile.ZipFile(archive, "r") |
633 zipFile = zipfile.ZipFile(archive, "r") |
634 try: |
634 try: |
635 aversion = zip.read("VERSION").decode("utf-8") |
635 aversion = zipFile.read("VERSION").decode("utf-8") |
636 except KeyError: |
636 except KeyError: |
637 aversion = "" |
637 aversion = "" |
638 zip.close() |
638 zipFile.close() |
639 |
639 |
640 if aversion == version: |
640 if aversion == version: |
641 if not self.__external: |
641 if not self.__external: |
642 # Check against installed/loaded plug-ins |
642 # Check against installed/loaded plug-ins |
643 pluginManager = e5App().getObject("PluginManager") |
643 pluginManager = e5App().getObject("PluginManager") |