From 2ca1101326bbe3ae77f4b919c3092d5c00a7132b Mon Sep 17 00:00:00 2001 From: I-Al-Istannen Date: Mon, 19 Apr 2021 14:53:16 +0200 Subject: [PATCH 1/3] Fix typo in sync_url --- sync_url.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sync_url.py b/sync_url.py index ca78de0..8b10004 100755 --- a/sync_url.py +++ b/sync_url.py @@ -131,13 +131,13 @@ def main() -> None: return True if args.local_first: - file_confilict_resolver: FileConflictResolver = _resolve_local_first + file_conflict_resolver: FileConflictResolver = _resolve_local_first elif args.no_delete: - file_confilict_resolver = _resolve_no_delete + file_conflict_resolver = _resolve_no_delete elif args.remote_first: - file_confilict_resolver = _resolve_remote_first + file_conflict_resolver = _resolve_remote_first else: - file_confilict_resolver = resolve_prompt_user + file_conflict_resolver = resolve_prompt_user pferd.enable_logging() @@ -149,7 +149,7 @@ def main() -> None: dir_filter=dir_filter, username=username, password=password, - file_conflict_resolver=file_confilict_resolver, + file_conflict_resolver=file_conflict_resolver, transform=sanitize_windows_path ) From 2bd40a5f306e5bf536036802f4fadd45da61c825 Mon Sep 17 00:00:00 2001 From: I-Al-Istannen Date: Thu, 29 Apr 2021 00:15:12 +0200 Subject: [PATCH 2/3] Fix -p and -u flags --- sync_url.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sync_url.py b/sync_url.py index 8b10004..8df6842 100755 --- a/sync_url.py +++ b/sync_url.py @@ -26,9 +26,10 @@ _LOGGER = logging.getLogger("sync_url") _PRETTY = PrettyLogger(_LOGGER) -def _extract_credentials(file_path: Optional[str]) -> UserPassAuthenticator: +def _extract_credentials(file_path: Optional[str], + username: Optional[str], password: Optional[str]) -> UserPassAuthenticator: if not file_path: - return UserPassAuthenticator("KIT ILIAS Shibboleth", None, None) + return UserPassAuthenticator("KIT ILIAS Shibboleth", username, password) if not Path(file_path).exists(): _PRETTY.error("Credential file does not exist") @@ -96,7 +97,7 @@ def main() -> None: "KIT ILIAS Shibboleth", username=args.username, password=args.password ) else: - inner_auth = _extract_credentials(args.credential_file) + inner_auth = _extract_credentials(args.credential_file, args.username, args.password) username, password = inner_auth.get_credentials() authenticator = KitShibbolethAuthenticator(inner_auth) From cccd68e04aebcfca44d59da13c596dbf2977615d Mon Sep 17 00:00:00 2001 From: I-Al-Istannen Date: Thu, 29 Apr 2021 00:18:26 +0200 Subject: [PATCH 3/3] Bump version to v2.6.2 --- README.md | 6 +++--- setup.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 178fbac..5ab74eb 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Ensure that you have at least Python 3.8 installed. To install PFERD or update your installation to the latest version, run this wherever you want to install or have already installed PFERD: ``` -$ pip install git+https://github.com/Garmelon/PFERD@v2.6.1 +$ pip install git+https://github.com/Garmelon/PFERD@v2.6.2 ``` The use of [venv] is recommended. @@ -60,8 +60,8 @@ $ mkdir Vorlesungen $ cd Vorlesungen $ python3 -m venv .venv $ source .venv/bin/activate -$ pip install git+https://github.com/Garmelon/PFERD@v2.6.1 -$ curl -O https://raw.githubusercontent.com/Garmelon/PFERD/v2.6.1/example_config.py +$ pip install git+https://github.com/Garmelon/PFERD@v2.6.2 +$ curl -O https://raw.githubusercontent.com/Garmelon/PFERD/v2.6.2/example_config.py $ python3 example_config.py $ deactivate ``` diff --git a/setup.py b/setup.py index a4dfab3..79186c1 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import find_packages, setup setup( name="PFERD", - version="2.6.1", + version="2.6.2", packages=find_packages(), install_requires=[ "requests>=2.21.0",