[extensions-web] extension-info: workaround missing Shell version in metadata.json



commit 9cf572e2ecb71a2db17b9a49c90663a1eecb5ec2
Author: Yuri Konotopov <ykonotopov gnome org>
Date:   Sat Apr 15 17:29:15 2017 +0400

    extension-info: workaround missing Shell version in metadata.json

 sweettooth/extensions/views.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/sweettooth/extensions/views.py b/sweettooth/extensions/views.py
index dcea9b6..f7b4f5b 100644
--- a/sweettooth/extensions/views.py
+++ b/sweettooth/extensions/views.py
@@ -51,6 +51,10 @@ def grab_proper_extension_version(extension, shell_version, disable_version_vali
         supported_shell_versions = set(shell_version
                                        for version in visible_versions
                                        for shell_version in version.shell_versions.all())
+
+        if not supported_shell_versions:
+            return None
+
         supported_shell_versions = sorted(supported_shell_versions, key=lambda x: (x.major, x.minor, 
x.point))
         requested_shell_version = models.parse_version_string(shell_version)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]