Merge lp:~eridanus-developers/eridanus-std/yahoo-timestamp into lp:eridanus-std

Proposed by Tristan Seligmann
Status: Merged
Approved by: Jonathan Jacobs
Approved revision: 107
Merged at revision: 107
Proposed branch: lp:~eridanus-developers/eridanus-std/yahoo-timestamp
Merge into: lp:eridanus-std
Diff against target: 30 lines (+2/-7)
2 files modified
eridanusstd/plugindefs/currency.py (+1/-1)
eridanusstd/yahoo.py (+1/-6)
To merge this branch: bzr merge lp:~eridanus-developers/eridanus-std/yahoo-timestamp
Reviewer Review Type Date Requested Status
Jonathan Jacobs Approve
Review via email: mp+38139@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jonathan Jacobs (jjacobs) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'eridanusstd/plugindefs/currency.py'
2--- eridanusstd/plugindefs/currency.py 2010-06-12 13:13:55 +0000
3+++ eridanusstd/plugindefs/currency.py 2010-10-11 16:49:43 +0000
4@@ -37,7 +37,7 @@
5
6 def convert((rate, tradeTime)):
7 convertedAmount = rate * amount
8- source.reply(unicode(convertedAmount))
9+ source.reply(u'%s (at %s)' % (convertedAmount, tradeTime))
10
11 return yahoo.currencyExchange(currencyFrom, currencyTo
12 ).addCallback(convert)
13
14=== modified file 'eridanusstd/yahoo.py'
15--- eridanusstd/yahoo.py 2008-09-27 13:25:41 +0000
16+++ eridanusstd/yahoo.py 2010-10-11 16:49:43 +0000
17@@ -23,12 +23,7 @@
18 if lastTradeRate == 0:
19 raise errors.InvalidCurrency(u'One of the specified currency codes is invalid')
20
21- print d, d.split('/', 3)
22- month, day, year = map(int, d.split('/', 3))
23- d = date(year, month, day)
24- t = Time.fromHumanly(t).asDatetime().time()
25- tradeTime = Time.fromDatetime(datetime.combine(d, t))
26-
27+ tradeTime = u'%s %s' % (d, t)
28 return Decimal(lastTradeRate), tradeTime
29
30 url = CURRENCY_URL.add('s', '%s%s=X' % (currencyFrom, currencyTo))

Subscribers

People subscribed via source and target branches