Skip to content

Conversation

@jsharp6968
Copy link

No description provided.

Copy link
Member

@ngharo ngharo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spotted a couple issues.

Thanks for taking the time to submit a PR!

@@ -1,3 +1,4 @@
"""Adapted the code to make a Huawei version that uses dslforum schemas"""
#!/bin/python
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shebang should always come first

res = res.replace("\n", "");
res = res.replace("\t", "");
pres = res.split("<serviceId>urn:upnp-org:serviceId:WANIPConn1</serviceId>");
pres = res.split("<serviceId>urn:dslforum-org:serviceId:WANIPConn1</serviceId>");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be better to try both or make it configurable. While you're adding support for your devices, it probably is breaking support for the others.

ctrl = p3res[1];
open_ports = urllib2.Request("http://"+rhost[1]+""+ctrl, opmsg);
open_ports.add_header("SOAPACTION", '"urn:schemas-upnp-org:service:WANIPConnection:1#GetGenericPortMappingEntry"');
open_ports.add_header("SOAPACTION", '"urn:dslforum-org :service:WANIPConnection:1#GetGenericPortMappingEntry"');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like an extra space here

@ngharo ngharo requested a review from AnarchyAngel October 28, 2019 22:20
@AnarchyAngel
Copy link
Member

AnarchyAngel commented Oct 28, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants