Rev 12: Docs and handling absent setup.py's. in http://people.canonical.com/~robertc/baz2.0/plugins/plugin_info/trunk
Robert Collins
robertc at robertcollins.net
Mon Mar 1 02:17:20 GMT 2010
At http://people.canonical.com/~robertc/baz2.0/plugins/plugin_info/trunk
------------------------------------------------------------
revno: 12
revision-id: robertc at robertcollins.net-20100301021719-d1udrsm29naaaqgf
parent: robertc at robertcollins.net-20100301021253-zwf499sr0493okaa
committer: Robert Collins <robertc at robertcollins.net>
branch nick: trunk
timestamp: Mon 2010-03-01 13:17:19 +1100
message:
Docs and handling absent setup.py's.
=== modified file 'commands.py'
--- a/commands.py 2010-03-01 02:12:53 +0000
+++ b/commands.py 2010-03-01 02:17:19 +0000
@@ -17,6 +17,8 @@
"""plugin-info commands."""
+import errno
+
from bzrlib.branch import Branch
import bzrlib.commands
from bzrlib import errors
@@ -30,6 +32,11 @@
This reads the metadata for a plugin from a branch or directory containing
the plugin and reports it to stdout.
+
+ Plugins with no setup.py will be skipped. Plugins with a setup.py that
+ tries to install or otherwise run code may fail to probe - this command
+ deliberately lets that interrupt the scan: fix the plugin or don't probe
+ it.
"""
takes_args = ['location+']
@@ -59,5 +66,10 @@
except errors.NotBranchError:
raise
else:
- self.dump_info(extract_info_branch(branch))
+ try:
+ self.dump_info(extract_info_branch(branch))
+ except IOError, e:
+ if e.errno != errno.ENOENT:
+ raise
+ note("No info for %s" % url)
self.outf.write('\n')
More information about the bazaar-commits
mailing list