From: Philip Joseph Date: Thu, 22 Dec 2016 10:56:46 +0000 (+0530) Subject: Minor fix for file mime difference in ubuntu X-Git-Tag: v1.0.3~6 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F27%2F827%2F1;p=osm%2FSO.git Minor fix for file mime difference in ubuntu Signed-off-by: Philip Joseph --- diff --git a/common/python/rift/mano/yang_translator/shell.py b/common/python/rift/mano/yang_translator/shell.py index f353e922..915cd6c5 100644 --- a/common/python/rift/mano/yang_translator/shell.py +++ b/common/python/rift/mano/yang_translator/shell.py @@ -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}"). \