[U-Boot] flashair and u-boot hooks script
Michal Simek
michal.simek at xilinx.com
Tue Nov 22 15:33:33 CET 2016
On 22.11.2016 15:12, Michal Simek wrote:
> Hi guys,
>
> did you see this problem before?
>
> [bin]$ ./u-boot-test-flash xilinx_zynqmp_zcu102 zcu102
> 192.168.0.103 push:/tmp/tmp.I2MxPKltj7
> PUSH DIR: /tmp/tmp.I2MxPKltj7
> ..PUSH FILE: u-boot.bin
> .... 200
> [bin]$ ./u-boot-test-flash xilinx_zynqmp_zcu102 zcu102
> ./flashair.zynqmp: line 42: : No such file or directory
> [bin]$ ./u-boot-test-flash xilinx_zynqmp_zcu102 zcu102
> 192.168.0.103 rmlist:/tmp/tmp.UuwcmCDprT push:/tmp/tmp.tmM0rQ89CJ
> RM LIST: /tmp/tmp.UuwcmCDprT
> Traceback (most recent call last):
> File "/home/monstr/bin/uboot-test-hooks/bin/push-flashair.py", line
> 118, in <module>
> main()
> File "/home/monstr/bin/uboot-test-hooks/bin/push-flashair.py", line
> 115, in main
> func(args.host, param)
> File "/home/monstr/bin/uboot-test-hooks/bin/push-flashair.py", line
> 61, in op_rm_list
> response = requests.get('http://%s/command.cgi' % host, params)
> TypeError: get() takes 1 positional argument but 2 were given
>
>
> Pushing files is fine but removing note. Is there any setting which
> needs to be done on flashair to support removing files?
After playing with this I found that this is fixing it.
Why - I have no idea. Can you please make a commit message and test this?
diff --git a/bin/push-flashair.py b/bin/push-flashair.py
index 1466f1586f33..b71149a4e603 100755
--- a/bin/push-flashair.py
+++ b/bin/push-flashair.py
@@ -58,7 +58,7 @@ def op_push_dir(host, local_dir):
def op_rm_list(host, rm_list_file):
print('RM LIST: ' + rm_list_file)
params = {'op': 100, 'DIR': '/'}
- response = requests.get('http://%s/command.cgi' % host, params)
+ response = requests.get('http://%s/command.cgi' % host, params=params)
response.raise_for_status()
lines = response.text.splitlines()
if lines[0] != 'WLANSD_FILELIST':
@@ -78,7 +78,7 @@ def op_rm_list(host, rm_list_file):
if fnmatch.fnmatch(remote_filename, rmspec):
print('..DELETE: ' + remote_filename)
params = {'DEL': '/' + remote_filename}
- response = requests.get('http://%s/upload.cgi' %
host, params)
+ response = requests.get('http://%s/upload.cgi' %
host, params=params)
print('.... ' + str(response.status_code))
response.raise_for_status()
if 'SUCCESS' not in response.text:
Thanks,
Michal
More information about the U-Boot
mailing list