##### SUMMARY

SyntaxWarning over using is for comparison of literals. The fix is simple and is a good beginner issue.

```
contrib/inventory/cobbler.py:218: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if this_dns_name is not None and this_dns_name is not "":
```

##### ISSUE TYPE

- Bug Report

##### COMPONENT NAME

cobbler

##### ANSIBLE VERSION

devel branch
""" Reads the index from the cache file sets self.index """
        cache = open(self.cache_path_inventory, 'r')
        json_inventory = cache.read()
        self.inventory = json.loads(json_inventory)
    def load_cache_from_cache(self):
        """ Reads the cache from the cache file sets self.cache """
        cache = open(self.cache_path_cache, 'r')
        json_cache = cache.read()
        self.cache = json.loads(json_cache)
    def write_to_cache(self, data, filename):
        """ Writes data in JSON format to a file """
        json_data = self.json_format_dict(data, True)
        cache = open(filename, 'w')
        cache.write(json_data)
        cache.close()
    def to_safe(self, word):
        """ Converts 'bad' characters in a string to underscores so they can be used as Ansible groups """
        return re.sub(r"[^A-Za-z0-9\-]", "_", word)
    def json_format_dict(self, data, pretty=False):
        """ Converts a dict to a JSON object and dumps it as a formatted string """
        if pretty:
            return json.dumps(data, sort_keys=True, indent=2)
        else:
            return json.dumps(data)
CobblerInventory()