summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-12-14 19:47:09 +0200
committerYaroslav Brustinov <ybrustin@cisco.com>2016-12-14 19:47:09 +0200
commit40288bbc170286d50d8c498a5f4dd5c70637763d (patch)
tree8853f81d76e198add49e3b7b972f5022a7e94477
parentbf48112c47ba2b8a67492cb30b1140f35928183e (diff)
master daemon: give same name for downloaded package, thus the size will not explode
Change-Id: Iffc4fe698b8a9d27656b7211fd2b969e735ef596 Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
-rwxr-xr-xscripts/master_daemon.py3
1 files changed, 1 insertions, 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])