iot-lab / aggregation-tools

Tools to aggregate iot-lab nodes tcp outputs.
Other
3 stars 7 forks source link

Display meaningful message when authentication fails #2

Closed aabadie closed 8 years ago

aabadie commented 8 years ago

The fix uses the same strategy used with the cli-tools.

cladmi commented 8 years ago

I'm doing it right now with code in cli-tools to prevent code duplication.

aabadie commented 8 years ago

Do you plan to create cli-tools own exception and catch them in each main functions ? This seems a clean solution but maybe you have a better idea.

cladmi commented 8 years ago

I just catch the exception with the same context manager which prints the error and exits:

In cli-tools: https://github.com/iot-lab/cli-tools/compare/2.1.0 Aggregation-tools: https://github.com/iot-lab/aggregation-tools/compare/1.5.0

If you have any suggestions.

Currently to run aggregation-tools tests using tox, this patch should also be applied

diff --git a/tox.ini b/tox.ini
index 548783d..5bc1c8f 100644
--- a/tox.ini
+++ b/tox.ini
@@ -16,7 +16,7 @@ commands=

 [testenv]
 deps=
-    git+git://github.com/iot-lab/cli-tools.git#egg=iotlabcli
+    git+git://github.com/iot-lab/cli-tools.git@2.1.0#egg=iotlabcli
     -rtests_utils/test-requirements.txt
     py26,py32: -rtests_utils/pylint-python-2.6_3.2.txt
 commands=
cladmi commented 8 years ago

I'm using sys.exit that breaks the execution, a cleaner exception management might be better for the organization.

aabadie commented 8 years ago

Your changes are really nice. I'll close this PR.