Merge lp:~diegosarmentero/ubuntuone-client/refactor-remove-windows-linux into lp:ubuntuone-client
| Status: | Merged |
|---|---|
| Approved by: | Manuel de la Peña on 2012-05-15 |
| Approved revision: | 1245 |
| Merged at revision: | 1243 |
| Proposed branch: | lp:~diegosarmentero/ubuntuone-client/refactor-remove-windows-linux |
| Merge into: | lp:ubuntuone-client |
| Diff against target: |
451 lines (+139/-189) 12 files modified
pylintrc (+1/-1) tests/platform/credentials/__init__.py (+27/-0) tests/platform/filesystem_notifications/test_windows.py (+1/-1) tests/platform/filesystem_notifier/__init__.py (+27/-0) tests/platform/filesystem_notifier/test_windows.py (+3/-1) ubuntuone/platform/__init__.py (+35/-36) ubuntuone/platform/filesystem_notifications/windows.py (+1/-1) ubuntuone/platform/linux/__init__.py (+0/-72) ubuntuone/platform/logger/__init__.py (+43/-0) ubuntuone/platform/logger/linux.py (+1/-0) ubuntuone/platform/windows/__init__.py (+0/-76) ubuntuone/syncdaemon/volume_manager.py (+0/-1) |
| To merge this branch: | bzr merge lp:~diegosarmentero/ubuntuone-client/refactor-remove-windows-linux |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Manuel de la Peña (community) | Approve on 2012-05-15 | ||
| Roberto Alsina (community) | 2012-05-14 | Approve on 2012-05-14 | |
|
Review via email:
|
|||
Commit Message
- Refactor platform, to move remaining modules inside windows and linux folders.
- 1244. By Diego Sarmentero on 2012-05-14
-
Fixing pyinotify imports
| Diego Sarmentero (diegosarmentero) wrote : | # |
- 1245. By Diego Sarmentero on 2012-05-14
-
Fixed pyinotify imports
| Manuel de la Peña (mandel) wrote : | # |
SO can we use import as here:
335 +if sys.platform == "win32":
336 + from ubuntuone.
337 + source = windows
338 +else:
339 + from ubuntuone.
340 + source = linux
and instead do:
from ubuntuone.
| Diego Sarmentero (diegosarmentero) wrote : | # |
> SO can we use import as here:
>
> 335 +if sys.platform == "win32":
> 336 + from ubuntuone.
> 337 + source = windows
> 338 +else:
> 339 + from ubuntuone.
> 340 + source = linux
>
> and instead do:
>
> from ubuntuone.
This is done this way, because if we do: "as source" for windows and linux, the lint checker fails with:
38: redefinition of unused 'source' from line 35


I think the __init__ from filesystem_ notifications is pretty ugly, but the code right now has to be in that way because of lint restriction, maybe we could add this file to the ignore ones in pylintrc and leave the code like this:
if sys.platform == "win32": platform. filesystem_ notifications import pyinotify_agnostic as pyinotify
from ubuntuone.
...
else:
import pyinotify
...
Opinions?