Merge lp:~alecu/ubuntuone-client/add-simple-zeitgeist into lp:ubuntuone-client
| Status: | Merged |
|---|---|
| Approved by: | John Lenton on 2010-12-07 |
| Approved revision: | 755 |
| Merged at revision: | 764 |
| Proposed branch: | lp:~alecu/ubuntuone-client/add-simple-zeitgeist |
| Merge into: | lp:ubuntuone-client |
| Diff against target: |
277 lines (+235/-2) 6 files modified
tests/eventlog/__init__.py (+14/-0) tests/eventlog/test_zglog.py (+155/-0) tests/syncdaemon/__init__.py (+1/-1) ubuntuone/eventlog/__init__.py (+16/-0) ubuntuone/eventlog/zglog.py (+48/-0) ubuntuone/syncdaemon/__init__.py (+1/-1) |
| To merge this branch: | bzr merge lp:~alecu/ubuntuone-client/add-simple-zeitgeist |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| John Lenton | Approve on 2010-12-07 | ||
| Natalia Bidart | 2010-11-23 | Approve on 2010-12-02 | |
|
Review via email:
|
|||
Commit Message
A twisted class to log zeitgeist events
Description of the Change
A twisted class to log zeitgeist events
- 752. By Alejandro J. Cura on 2010-11-25
-
renamed the logging module
- 753. By Alejandro J. Cura on 2010-12-01
-
fixes requested on review
- 754. By Alejandro J. Cura on 2010-12-02
-
merged with trunk
| John Lenton (chipaca) wrote : | # |
Like it!
But...
Could you change the strings in zlog.py from "blah""" to just "blah"? I didn't even know the former was valid python, and it looks horrible.
| Alejandro J. Cura (alecu) wrote : | # |
> Could you change the strings in zlog.py from "blah""" to just "blah"? I didn't
> even know the former was valid python, and it looks horrible.
Yes, yes it is, and yes it looks horrible.
| Alejandro J. Cura (alecu) wrote : | # |
Fixed and pushed. Good catch!
- 755. By Alejandro J. Cura on 2010-12-03
-
Fix horrible looking strings.
| Nicola Larosa (teknico) wrote : | # |
> Could you change the strings in zlog.py from "blah""" to just "blah"? I didn't
> even know the former was valid python, and it looks horrible.
It works because they are interpreted as two strings: "blah" and "" (empty), and then they are merged into one by implicit string concatenation, since they are in a parenthesized context.
| Alejandro J. Cura (alecu) wrote : | # |
> > Could you change the strings in zlog.py from "blah""" to just "blah"? I
> didn't
> > even know the former was valid python, and it looks horrible.
>
> It works because they are interpreted as two strings: "blah" and "" (empty),
> and then they are merged into one by implicit string concatenation, since they
> are in a parenthesized context.
Yeah, we discussed about this in PyAr a while ago, and I still find that it's ugly that this is valid python:
print "abc"""
And that this is not:
print """abc"
I think that implicit string concatenation in python *should* mandate a space between strings, but I guess it's a bit late to change the interpreter and third part parsers, and such.
Also, I think that in this case parenthesized context does not matters.


Tests will not run due to:
== Python Lint Notices ==
./tests/ eventlog/ test_zglog. py:
94: undefined name 'NotFoundError'
* Please remove spaces from docstring and add ending dot and initial upper case for:
""" Tests module """
""" event logging module """
* Is this correct? stdout has an extra -
121 + tempstdout = tempfile. TemporaryFile( prefix= "test-u1- stdout- ") TemporaryFile( prefix= "test-u1- stderr" )
122 + tempstderr = tempfile.
* This code:
233 + except RuntimeError, e:
234 + print e
should use the ubuntuone.logger and log the exception