From 40288bbc170286d50d8c498a5f4dd5c70637763d Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Wed, 14 Dec 2016 19:47:09 +0200 Subject: master daemon: give same name for downloaded package, thus the size will not explode Change-Id: Iffc4fe698b8a9d27656b7211fd2b969e735ef596 Signed-off-by: Yaroslav Brustinov --- scripts/master_daemon.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/master_daemon.py b/scripts/master_daemon.py index e4a2fd1c..c3c9c2d8 100755 --- a/scripts/master_daemon.py +++ b/scripts/master_daemon.py @@ -33,12 +33,11 @@ def get_trex_path(): def update_trex(package_path = 'http://trex-tgn.cisco.com/trex/release/latest'): if not args.allow_update: raise Exception('Updating server not allowed') + file_name = 'trex_package.tar.gz' # getting new package if package_path.startswith('http'): - file_name = package_path.split('/')[-1] ret_code, stdout, stderr = run_command('wget %s -O %s' % (package_path, os.path.join(tmp_dir, file_name)), timeout = 600) else: - file_name = os.path.basename(package_path) ret_code, stdout, stderr = run_command('rsync -Lc %s %s' % (package_path, os.path.join(tmp_dir, file_name)), timeout = 300) if ret_code: raise Exception('Could not get requested package. Result: %s' % [ret_code, stdout, stderr]) -- cgit 1.2.3-korg