commit:     7134b8d9820232ad8ea58860db2e911901a3a2c8
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 29 22:02:14 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr  9 06:51:34 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=7134b8d9

sync: webrsync: fix module name for (stub) Python implementation

- Fix module name for the (stub) Python implementation of the
  webrsync module: PyWebRsync != WebRsync.

- Raise NotImplementedError if someone actually tries to use it.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 lib/portage/sync/modules/webrsync/__init__.py | 4 ++--
 lib/portage/sync/modules/webrsync/webrsync.py | 4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/portage/sync/modules/webrsync/__init__.py 
b/lib/portage/sync/modules/webrsync/__init__.py
index bc0cdf43c..534a1d562 100644
--- a/lib/portage/sync/modules/webrsync/__init__.py
+++ b/lib/portage/sync/modules/webrsync/__init__.py
@@ -13,8 +13,8 @@ from portage.sync.config_checks import CheckSyncConfig
 
 
 DEFAULT_CLASS = "WebRsync"
-AVAILABLE_CLASSES = ["WebRsync", "PyWebsync"]
-options = {"1": "WebRsync", "2": "PyWebsync"}
+AVAILABLE_CLASSES = ["WebRsync", "PyWebRsync"]
+options = {"1": "WebRsync", "2": "PyWebRsync"}
 
 
 config_class = DEFAULT_CLASS

diff --git a/lib/portage/sync/modules/webrsync/webrsync.py 
b/lib/portage/sync/modules/webrsync/webrsync.py
index 18af5cfbb..f98162683 100644
--- a/lib/portage/sync/modules/webrsync/webrsync.py
+++ b/lib/portage/sync/modules/webrsync/webrsync.py
@@ -146,4 +146,6 @@ class PyWebRsync(SyncBase):
 
     def sync(self, **kwargs):
         """Sync the repository"""
-        pass
+        raise NotImplementedError(
+            "Python impl. of webrsync backend is not yet implemented"
+        )

Reply via email to