Add timeout configuration from args

master
Florian Charlaix 1 year ago
parent 649cf7b232
commit 713a656c5f
  1. 8
      scripts/gf_migration.py

@ -185,6 +185,8 @@ def main():
parser.add_argument("--memory-limit", type=int, default=100,
help="The file size limit (MB) before using a file " \
"instead of RAM as buffer for upload/download")
parser.add_argument("--timeout", type=int, default=30,
help="The WebDav requests timeout in seconds")
try:
args = parser.parse_args()
@ -192,7 +194,8 @@ def main():
src_client = Client({
"webdav_hostname": args.src_host,
"webdav_login": args.src_user,
"webdav_password": args.src_passwd
"webdav_password": args.src_passwd,
"webdav_timeout": args.timeout
})
check = Migration.check_client(src_client, args.src_path)
@ -202,7 +205,8 @@ def main():
dest_client = Client({
"webdav_hostname": args.dest_host,
"webdav_login": args.dest_user,
"webdav_password": args.dest_passwd
"webdav_password": args.dest_passwd,
"webdav_timeout": args.timeout
})
check = Migration.check_client(dest_client, args.dest_path)

Loading…
Cancel
Save