[MERGE] Fix for Bug 129299, BZR_PLUGIN_PATH should ignore trailiing slashes.
Aaron Bentley
aaron.bentley at utoronto.ca
Thu Aug 23 16:18:59 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Aaron Bentley wrote:
> Aaron Bentley has voted approve.
> Status is now: Approved
>
>
> For details, see:
> http://bundlebuggy.aaronbentley.com/request/%3C46C303B4.60109%40latte.ca%3E
bb:resubmit
Your changes have a failing test case:
Traceback (most recent call last):
File "/home/abentley/bzr/foo/bzrlib/tests/test_plugins.py", line 76,
in test_plugins_with_the_same_name_are_not_loaded
self.assertEqual(['first'], self.activeattributes[tempattribute])
AssertionError: not equal:
a = ['first']
b = []
Also, many of your lines were wider than 79 chars.
Some had trailing whitespace.
You aren't handling files safely. They should always be explicitly
closed, because otherwise, Windows may try to delete them before they're
closed, and fail. Also, it is recommended to use 'open', not 'file' as
a constructor.
So:
outfile = open(os.path.join('plugin_test', 'plugin.py'), 'w')
try:
print >> outfile, template % (tempattribute, 'plugin')
finally:
outfile.close()
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGzaVj0F+nu1YWqI0RAmEPAJ4hj4mGjzhH+HT5vERxOVig/Ez4mwCeMlAB
+Hck599W77fXApDjsSN5DgY=
=gfIZ
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list