diff mbox

[Branch,~linaro-validation/lava-tool/trunk] Rev 171: Merge no-auth branch that makes keyring entirely optional

Message ID 20120322173018.4986.75174.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Zygmunt Krynicki March 22, 2012, 5:30 p.m. UTC
Merge authors:
  Zygmunt Krynicki (zkrynicki)
Related merge proposals:
  https://code.launchpad.net/~zkrynicki/lava-tool/no-auth/+merge/97288
  proposed by: Zygmunt Krynicki (zkrynicki)
  review: Approve - Michael Hudson-Doyle (mwhudson)
------------------------------------------------------------
revno: 171 [merge]
committer: Zygmunt Krynicki <zygmunt.krynicki@linaro.org>
branch nick: release
timestamp: Thu 2012-03-22 18:27:51 +0100
message:
  Merge no-auth branch that makes keyring entirely optional
modified:
  lava/tool/dispatcher.py
  setup.py


--
lp:lava-tool
https://code.launchpad.net/~linaro-validation/lava-tool/trunk

You are subscribed to branch lp:lava-tool.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-tool/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'lava/tool/dispatcher.py'
--- lava/tool/dispatcher.py	2012-03-13 18:22:16 +0000
+++ lava/tool/dispatcher.py	2012-03-13 19:12:47 +0000
@@ -66,7 +66,12 @@ 
         """
         logging.debug("Loading commands in entry point %r", entrypoint_name)
         for entrypoint in pkg_resources.iter_entry_points(entrypoint_name):
-                self.add_command_cls(entrypoint.load())
+            try:
+                command_cls = entrypoint.load()
+            except (ImportError, pkg_resources.DistributionNotFound) as exc:
+                logging.debug("Unable to load %s: %r", entrypoint, exc)
+            else:
+                self.add_command_cls(command_cls)
 
     def add_command_cls(self, command_cls):
         """

=== modified file 'setup.py'
--- setup.py	2012-03-13 18:22:16 +0000
+++ setup.py	2012-03-13 19:13:08 +0000
@@ -40,7 +40,7 @@ 
     help = lava.tool.commands.help:help
     [lava_tool.commands]
     help = lava.tool.commands.help:help
-    auth-add = lava_tool.commands.auth:auth_add
+    auth-add = lava_tool.commands.auth:auth_add [auth]
     """,
     classifiers=[
         "Development Status :: 4 - Beta",
@@ -52,11 +52,8 @@ 
         "Programming Language :: Python :: 2.7",
         "Topic :: Software Development :: Testing",
     ],
-    install_requires=[
-        'argparse >= 1.1',
-        'keyring'],
-    setup_requires=[
-        'versiontools >= 1.3.1'],
-    tests_require=[
-        'mocker >= 1.0'],
+    extras_require={'auth': ['keyring']},
+    install_requires=['argparse >= 1.1'],
+    setup_requires=['versiontools >= 1.3.1'],
+    tests_require=['mocker >= 1.0'],
     zip_safe=True)