diff options
author | Papoteur <papoteur@mageia.org> | 2023-01-21 12:52:24 +0100 |
---|---|---|
committer | Papoteur <papoteur@mageia.org> | 2023-01-21 12:52:44 +0100 |
commit | b00c767c75ffe316e161b44e65a08381369e7ec5 (patch) | |
tree | e4547791d99254c1b6b3d1e8de1d085164bcf5ef /mageiaSync | |
parent | 652c7a7b1ac08fee6a62ab2b1f0a84c7697ca472 (diff) | |
download | MageiaSync-b00c767c75ffe316e161b44e65a08381369e7ec5.tar MageiaSync-b00c767c75ffe316e161b44e65a08381369e7ec5.tar.gz MageiaSync-b00c767c75ffe316e161b44e65a08381369e7ec5.tar.bz2 MageiaSync-b00c767c75ffe316e161b44e65a08381369e7ec5.tar.xz MageiaSync-b00c767c75ffe316e161b44e65a08381369e7ec5.zip |
reload GPG key only if it is expired
Diffstat (limited to 'mageiaSync')
-rw-r--r-- | mageiaSync/mageiaSyncExt.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mageiaSync/mageiaSyncExt.py b/mageiaSync/mageiaSyncExt.py index 37db330..b57fef8 100644 --- a/mageiaSync/mageiaSyncExt.py +++ b/mageiaSync/mageiaSyncExt.py @@ -194,9 +194,13 @@ def rename(directory,oldRelease,newRelease, nbf, nbr): entry=os.path.join(directory,entry) if os.path.isfile(entry): if name.startswith(oldRelease): - newPath = os.path.join( os.path.dirname(entry) , name.replace(oldRelease, newRelease,1)) - os.rename(entry, newPath) - nbf = nbf + 1 + # gpg keys are no more valid + if name.endswith('.gpg'): + os.remove(entry) + else: + newPath = os.path.join( os.path.dirname(entry) , name.replace(oldRelease, newRelease,1)) + os.rename(entry, newPath) + nbf = nbf + 1 if os.path.isdir(entry): nbf, nbr = rename(entry,oldRelease,newRelease, nbf, nbr) if name.startswith(oldRelease) : |