From 07dd39ca61f06c49b50280256746e79ab9af3442 Mon Sep 17 00:00:00 2001 From: German Service Network Date: Sat, 13 Mar 2021 20:28:53 +0100 Subject: [PATCH] Merge github c0905e4 (Add a --nolock option) --- raspbmirror.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/raspbmirror.py b/raspbmirror.py index 1575a66..5073920 100644 --- a/raspbmirror.py +++ b/raspbmirror.py @@ -41,10 +41,13 @@ parser.add_argument("--debugskippool",help="skip downloading pool data, only dow parser.add_argument("--distswhitelist", help="specify comman seperated list of distributions") +parser.add_argument("--nolock", help="don't try to lock the target directory", action="store_true") + args = parser.parse_args() -lockfd = os.open('.',os.O_RDONLY) -fcntl.flock(lockfd,fcntl.LOCK_EX | fcntl.LOCK_NB) +if not args.nolock: + lockfd = os.open('.',os.O_RDONLY) + fcntl.flock(lockfd,fcntl.LOCK_EX | fcntl.LOCK_NB) dtNow = datetime.now() logpath = os.path.dirname(os.path.realpath(__file__)) -- 2.43.0