diff options
Diffstat (limited to 'webmap-download')
-rwxr-xr-x | webmap-download | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/webmap-download b/webmap-download index be48bbb..03c05af 100755 --- a/webmap-download +++ b/webmap-download @@ -136,8 +136,8 @@ if __name__ == '__main__': logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO) parser = argparse.ArgumentParser(description='Download or update GIS layers.') - parser.add_argument('--cachedir', default=None, - help='destination directory for downloaded files (default: .)') + parser.add_argument('--cachedir', default=os.curdir, + help=f'destination directory for downloaded files (default: {os.curdir})') parser.add_argument('--lockdir', default=None, help='optional directory for lock files') parser.add_argument('--debug', action='store_true', help=argparse.SUPPRESS) @@ -171,8 +171,8 @@ if __name__ == '__main__': # intentionally leave the dirfd open until the program terminates opendir_args = O_RDONLY|O_CLOEXEC|O_PATH|O_DIRECTORY - destdir_fd = None if args.cachedir is None else os.open(args.cachedir, opendir_args) - lockdir_fd = None if args.lockdir is None else os.open(args.lockdir, opendir_args) + destdir_fd = os.open(args.cachedir, opendir_args) + lockdir_fd = None if args.lockdir is None else os.open(args.lockdir, opendir_args) sessionRequests = requests.Session() |