Minor fix for file mime difference in ubuntu 27/827/1
authorPhilip Joseph <philip.joseph@riftio.com>
Thu, 22 Dec 2016 10:56:46 +0000 (16:26 +0530)
committerPhilip Joseph <philip.joseph@riftio.com>
Thu, 22 Dec 2016 10:56:46 +0000 (16:26 +0530)
Signed-off-by: Philip Joseph <philip.joseph@riftio.com>
common/python/rift/mano/yang_translator/shell.py

index f353e92..915cd6c 100644 (file)
@@ -149,7 +149,9 @@ class TranslatorShell(object):
         if typ.startswith('text/plain'):
             # Assume to be yaml
             return self.YAML
-        elif typ.startswith('application/x-gzip'):
+        # On Fedora 20, it return x-gzip, while on Ubuntu 16 it is gzip
+        elif typ.startswith('application/x-gzip') or \
+             typ.startswith('application/gzip') :
             return self.TAR
         else:
             msg = _("The file {0} is not a supported type: {1}"). \