summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Freyther <zecke@selfish.org>2005-08-01 23:05:40 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-08-01 23:05:40 +0000
commitfde83d7aabf6c0f8d56dbe1e1aba0783b004bab3 (patch)
tree17d2258899589cba9b7a0397fb1d52bf80ce3091
parent3819a64dd1b4cf7edbadbf532905db489a771276 (diff)
parent001dcf83e941e4b63250c9587b73c7c544ccce5d (diff)
merge of ea784b81f1d057de11cac0f979a22ebe0d182bcb
and f72a07a8eb8923cfccd905caf2ce6b3521add7df
-rw-r--r--classes/tinderclient.bbclass17
1 files changed, 12 insertions, 5 deletions
diff --git a/classes/tinderclient.bbclass b/classes/tinderclient.bbclass
index 5b55589ec0..168b7dec4e 100644
--- a/classes/tinderclient.bbclass
+++ b/classes/tinderclient.bbclass
@@ -1,25 +1,25 @@
def tinder_tz_offset(off):
- # get the offset. Either it is a number like
+ # get the offset.n minutes Either it is a number like
# +200 or -300
try:
return int(off)
except ValueError:
if off == "Europe/Berlin":
- return 200
+ return 120
else:
return 0
def tinder_tinder_time(offset):
import datetime
- td = datetime.timedelta(tinder_tz_offset(offset))
+ td = datetime.timedelta(minutes=tinder_tz_offset(offset))
time = datetime.datetime.utcnow() + td
return time.strftime('%m/%d/%Y %H:%M:%S')
def tinder_tinder_start(date,offset):
import datetime, time
- td = datetime.timedelta(tinder_tz_offset(offset))
+ td = datetime.timedelta(minutes=tinder_tz_offset(offset))
ti = time.strptime(date, "%m/%d/%Y %H:%M:%S")
- ti = datetime.datetime(*ti[0:7])-td
+ time = datetime.datetime(*ti[0:7])+td
return time.strftime('%m/%d/%Y %H:%M:%S')
def tinder_send_email(da, header, log):
@@ -42,9 +42,16 @@ def tinder_send_http(da, header, log):
import httplib, urllib
cont = "\n%s\n%s" % ( header, log)
headers = {"Content-type": "multipart/form-data" }
+ print cont
conn = httplib.HTTPConnection(data.getVar('TINDER_HOST',da, True))
conn.request("POST", data.getVar('TINDER_URL',da,True), cont, headers)
+
+ resp = conn.getresponse()
+ print resp.status, resp.reason
+ data = resp.read()
+ print data
+
conn.close()