Restore Python 2.7 support (#45)

Signed-off-by: Lukas Kämmerling <lukas.kaemmerling@hetzner-cloud.de>
This commit is contained in:
Lukas Kämmerling 2020-12-07 08:30:50 +01:00 committed by GitHub
parent 4f9881b7a0
commit ff359431a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -237,12 +237,12 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
def verify_file(self, path): def verify_file(self, path):
"""Return the possibly of a file being consumable by this plugin.""" """Return the possibly of a file being consumable by this plugin."""
return ( return (
super().verify_file(path) and super(InventoryModule, self).verify_file(path) and
path.endswith(("hcloud.yaml", "hcloud.yml")) path.endswith(("hcloud.yaml", "hcloud.yml"))
) )
def parse(self, inventory, loader, path, cache=True): def parse(self, inventory, loader, path, cache=True):
super().parse(inventory, loader, path, cache) super(InventoryModule, self).parse(inventory, loader, path, cache)
self._read_config_data(path) self._read_config_data(path)
self._configure_hcloud_client() self._configure_hcloud_client()
self._test_hcloud_token() self._test_hcloud_token()