You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/07/04 07:54:11 UTC

[GitHub] [cloudstack] mib1185 commented on a change in pull request #5110: Adding SUSE 15 support

mib1185 commented on a change in pull request #5110:
URL: https://github.com/apache/cloudstack/pull/5110#discussion_r663463461



##########
File path: python/lib/cloudutils/utilities.py
##########
@@ -134,17 +134,23 @@ def __init__(self):
                 self.distro = "Ubuntu"
             else:
                 raise UnknownSystemException(distributor)
-        else: 
+        elif os.path.exists("/etc/os-release"):
+            version = open("/etc/os-release").readline()
+            if version.find("openSUSE") != -1:
+                self.distro = "openSUSE"
+            else:
+                raise UnknownSystemException(distributor)

Review comment:
       @davidjumani you still need to remove this, since `distributor` is not defined and those would raise an additional `NameError` exception, but not the expected `UnknownSystemException`
   ```
   >>> raise UnknownSystemException(distributor)
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
   NameError: name 'distributor' is not defined
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org