feydrutha
|
2010-01-25
, 18:34
|
Posts: 68 |
Thanked: 36 times |
Joined on Dec 2009
|
#21
|
|
2010-01-25
, 19:36
|
Posts: 324 |
Thanked: 371 times |
Joined on Dec 2009
@ Vancouver, BC
|
#22
|
The Following User Says Thank You to Slocan For This Useful Post: | ||
|
2010-01-25
, 19:49
|
Posts: 5 |
Thanked: 7 times |
Joined on Jan 2010
@ Chicago, IL
|
#23
|
|
2010-01-25
, 19:54
|
Posts: 68 |
Thanked: 36 times |
Joined on Dec 2009
|
#24
|
|
2010-01-25
, 20:12
|
Posts: 324 |
Thanked: 371 times |
Joined on Dec 2009
@ Vancouver, BC
|
#25
|
thanks for the tip but I have no spaces here, so I'm still in the dark..
from gnome import gconf import socket, httplib, urllib, base64, htmllib, formatter username = base64.b64decode(gconf.client_get_default().get_string('/apps/maegios/username')) password = base64.b64decode(gconf.client_get_default().get_string('/apps/maegios/password')) base64string = base64.encodestring('%s:%s' % (username, password))[:-1] headers = {"Authorization": "Basic %s" % base64string} socket.setdefaulttimeout(5) url = gconf.client_get_default().get_string('/apps/maegios/url').split('/') connection = httplib.HTTPSConnection(url[2]) connection.request("POST", "/%s/%s" % (url[3], "cgi-bin/status.cgi"), [], headers) response = connection.getresponse() data = response.read() data
The Following User Says Thank You to Slocan For This Useful Post: | ||
|
2010-01-25
, 23:28
|
Posts: 324 |
Thanked: 371 times |
Joined on Dec 2009
@ Vancouver, BC
|
#26
|
The Following User Says Thank You to Slocan For This Useful Post: | ||
|
2010-01-26
, 03:39
|
Posts: 5 |
Thanked: 7 times |
Joined on Jan 2010
@ Chicago, IL
|
#27
|
Just some quick feedback after playing with it for a bit:
- the main window does not refresh automatically if it stays open
- clicking the widget seems to open a new stackedWindow on top of the old ones (meaning you have to close them all one by one to quit)
- need a way to disable the yellow banners (or at least that it doesn't flash if the alerts haven't changed)
- when I had username/connection issues, the app seemed to lock up for quite a while, and even triggered the notice hildon-home was not responding
- give more feedback when the connection fails (report what the server said) rather than say "Disconnected"
Otherwise, that's great work, it works well, and is pretty handy.
|
2010-01-26
, 05:36
|
Posts: 324 |
Thanked: 371 times |
Joined on Dec 2009
@ Vancouver, BC
|
#28
|
|
2010-01-26
, 16:43
|
Posts: 68 |
Thanked: 36 times |
Joined on Dec 2009
|
#29
|
If you're not afraid of the command line, start a python interpreter, and then type (or copy/paste) the following. The end variable data would contain what the server returned (if all goes well, it returns [], double brackets). If there is an error on the way, it might lead you to the solution.
The Following User Says Thank You to feydrutha For This Useful Post: | ||
|
2010-01-26
, 16:54
|
Posts: 5 |
Thanked: 7 times |
Joined on Jan 2010
@ Chicago, IL
|
#30
|
Thanks a lot. I've tried the code above and can now see the error message apache is giving. It is giving me an authorization required message. I have now cut&pasted the password in and am 100% sure all the credentials are correct.
The webserver is apache 2, and I am using htdigest authentication. I could try switching to basic authentication if this might be helpful.. should make no difference security-wise since it is all SSL anyhow.
Otherwise I have no clue... could special characters in the password give trouble? I have some in there, but i'd rather not post which ;-)... But I could try changing password to test this if it is at all plausible.
The Following User Says Thank You to lothix For This Useful Post: | ||