From 4f3a33cd5224eaf698d42d36a777484f81985585 Mon Sep 17 00:00:00 2001 From: mshivashankar Date: Wed, 26 Jul 2023 16:42:48 +0200 Subject: [PATCH] Remove dublicate code --- asab/library/providers/azurestorage.py | 1 - asab/library/providers/filesystem.py | 1 - asab/library/providers/zookeeper.py | 1 - 3 files changed, 3 deletions(-) diff --git a/asab/library/providers/azurestorage.py b/asab/library/providers/azurestorage.py index c05dc3d50..8d8414739 100644 --- a/asab/library/providers/azurestorage.py +++ b/asab/library/providers/azurestorage.py @@ -42,7 +42,6 @@ class AzureStorageLibraryProvider(LibraryProviderABC): def __init__(self, library, path, layer): super().__init__(library, layer) assert path[:6] == "azure+" - self.Layer = layer self.URL = urllib.parse.urlparse(path[6:]) self.Model = None # Will be set by `_load_model` method self.Path = path diff --git a/asab/library/providers/filesystem.py b/asab/library/providers/filesystem.py index b6291931a..8b9d3d95c 100644 --- a/asab/library/providers/filesystem.py +++ b/asab/library/providers/filesystem.py @@ -32,7 +32,6 @@ def __init__(self, library, path, layer, *, set_ready=True): super().__init__(library, layer) self.BasePath = os.path.abspath(path) - self.Layer = layer while self.BasePath.endswith("/"): self.BasePath = self.BasePath[:-1] diff --git a/asab/library/providers/zookeeper.py b/asab/library/providers/zookeeper.py index 94b912287..931665245 100644 --- a/asab/library/providers/zookeeper.py +++ b/asab/library/providers/zookeeper.py @@ -109,7 +109,6 @@ def __init__(self, library, path, layer): self.BasePath = url_pieces.path.lstrip("/") while self.BasePath.endswith("/"): self.BasePath = self.BasePath[:-1] - self.Layer = layer self.BasePath = '/' + self.BasePath if self.BasePath == '/': self.BasePath = ''