summaryrefslogtreecommitdiffstats
path: root/scripts/master_daemon.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/master_daemon.py')
-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])