Merge lp:~stefanor/ibid/hardy-fixes into lp:~ibid-core/ibid/old-trunk-1.6

Proposed by Stefano Rivera
Status: Merged
Approved by: Jonathan Hitchcock
Approved revision: not available
Merged at revision: 836
Proposed branch: lp:~stefanor/ibid/hardy-fixes
Merge into: lp:~ibid-core/ibid/old-trunk-1.6
Diff against target: 23 lines (+11/-1)
1 file modified
ibid/plugins/__init__.py (+11/-1)
To merge this branch: bzr merge lp:~stefanor/ibid/hardy-fixes
Reviewer Review Type Date Requested Status
Jonathan Hitchcock Approve
Michael Gorven Approve
Review via email: mp+17149@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jonathan Hitchcock (vhata) wrote :

What is up with the linebreaks on the last four lines of your diff?

review: Needs Information
Revision history for this message
Michael Gorven (mgorven) wrote :

 review approve

review: Approve
lp:~stefanor/ibid/hardy-fixes updated
831. By Stefano Rivera

Tidy whitespace

Revision history for this message
Stefano Rivera (stefanor) wrote :

> What is up with the linebreaks on the last four lines of your diff?

Care to re-review?

Revision history for this message
Jonathan Hitchcock (vhata) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ibid/plugins/__init__.py'
2--- ibid/plugins/__init__.py 2010-01-04 22:04:04 +0000
3+++ ibid/plugins/__init__.py 2010-01-12 07:31:10 +0000
4@@ -5,8 +5,18 @@
5 import re
6
7 from twisted.spread import pb
8-from twisted.plugin import pluginPackagePaths
9 from twisted.web import resource
10+try:
11+ from twisted.plugin import pluginPackagePaths
12+except ImportError:
13+ # Not available in Twisted 2.5.0 in Ubuntu hardy
14+ # This is straight from twisted.plugin
15+ import os.path
16+ import sys
17+ def pluginPackagePaths(name):
18+ package = name.split('.')
19+ return [os.path.abspath(os.path.join(x, *package)) for x in sys.path
20+ if not os.path.exists(os.path.join(x, *package + ['__init__.py']))]
21
22 import ibid
23 from ibid.compat import json

Subscribers

People subscribed via source and target branches