* [U-Boot] flashair and u-boot hooks script
@ 2016-11-22 14:12 Michal Simek
2016-11-22 14:33 ` Michal Simek
2016-11-22 14:33 ` Tom Rini
0 siblings, 2 replies; 6+ messages in thread
From: Michal Simek @ 2016-11-22 14:12 UTC (permalink / raw)
To: u-boot
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?
Thanks,
Michal
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] flashair and u-boot hooks script
2016-11-22 14:12 [U-Boot] flashair and u-boot hooks script Michal Simek
@ 2016-11-22 14:33 ` Michal Simek
2016-11-22 23:25 ` Stephen Warren
2016-11-22 14:33 ` Tom Rini
1 sibling, 1 reply; 6+ messages in thread
From: Michal Simek @ 2016-11-22 14:33 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] flashair and u-boot hooks script
2016-11-22 14:12 [U-Boot] flashair and u-boot hooks script Michal Simek
2016-11-22 14:33 ` Michal Simek
@ 2016-11-22 14:33 ` Tom Rini
2016-11-22 14:47 ` Michal Simek
1 sibling, 1 reply; 6+ messages in thread
From: Tom Rini @ 2016-11-22 14:33 UTC (permalink / raw)
To: u-boot
On Tue, Nov 22, 2016 at 03:12:52PM +0100, 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
OK, what's at line 42 here? I assume this is modeled on the rpi script
since you're deleting thing.
I also assume that you have things similar to
http://konsulko.com/developing-on-hardware-without-functional-networking/
and I just re-checked and I have nothing special set on my RPi 3 that's
not also listed in that example. Thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161122/df655bc3/attachment.sig>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] flashair and u-boot hooks script
2016-11-22 14:33 ` Tom Rini
@ 2016-11-22 14:47 ` Michal Simek
0 siblings, 0 replies; 6+ messages in thread
From: Michal Simek @ 2016-11-22 14:47 UTC (permalink / raw)
To: u-boot
On 22.11.2016 15:33, Tom Rini wrote:
> On Tue, Nov 22, 2016 at 03:12:52PM +0100, 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
>
> OK, what's at line 42 here? I assume this is modeled on the rpi script
> since you're deleting thing.
>
> I also assume that you have things similar to
> http://konsulko.com/developing-on-hardware-without-functional-networking/
> and I just re-checked and I have nothing special set on my RPi 3 that's
> not also listed in that example. Thanks!
>
It looks like there is a bug in the script at least for me where you
need to assigned params in requests.get.
Not a python guy that's why this needs to be checked by someone else.
Thanks,
Michal
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] flashair and u-boot hooks script
2016-11-22 14:33 ` Michal Simek
@ 2016-11-22 23:25 ` Stephen Warren
2016-11-23 6:45 ` Michal Simek
0 siblings, 1 reply; 6+ messages in thread
From: Stephen Warren @ 2016-11-22 23:25 UTC (permalink / raw)
To: u-boot
On 11/22/2016 07:33 AM, Michal Simek wrote:
> 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
> 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)
The docs agree with this change, so I've pushed it to the repo. I
haven't tested it though; I figure your testing is enough given that the
docs state params should indeed be a keyword argument.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] flashair and u-boot hooks script
2016-11-22 23:25 ` Stephen Warren
@ 2016-11-23 6:45 ` Michal Simek
0 siblings, 0 replies; 6+ messages in thread
From: Michal Simek @ 2016-11-23 6:45 UTC (permalink / raw)
To: u-boot
On 23.11.2016 00:25, Stephen Warren wrote:
> On 11/22/2016 07:33 AM, Michal Simek wrote:
>> 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
>
>> 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)
>
> The docs agree with this change, so I've pushed it to the repo. I
> haven't tested it though; I figure your testing is enough given that the
> docs state params should indeed be a keyword argument.
Thanks,
Michal
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-11-23 6:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-22 14:12 [U-Boot] flashair and u-boot hooks script Michal Simek
2016-11-22 14:33 ` Michal Simek
2016-11-22 23:25 ` Stephen Warren
2016-11-23 6:45 ` Michal Simek
2016-11-22 14:33 ` Tom Rini
2016-11-22 14:47 ` Michal Simek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.