[tor-commits] [ooni-probe/master] Make the ascii art thing only be a special command line option

isis at torproject.org isis at torproject.org
Thu Oct 4 14:41:15 UTC 2012


commit 05b8d5b809db6ee34ee76c9e0c1a67d163b586ef
Author: Arturo Filastò <arturo at filasto.net>
Date:   Fri Sep 21 12:14:44 2012 +0000

    Make the ascii art thing only be a special command line option
---
 ooni/oonicli.py |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ooni/oonicli.py b/ooni/oonicli.py
index f14bf6e..e5c990f 100644
--- a/ooni/oonicli.py
+++ b/ooni/oonicli.py
@@ -42,7 +42,8 @@ class Options(usage.Options, app.ReactorSelectionMixin):
                 "network tests. These are loaded from modules, packages and"
                 "files listed on the command line")
 
-    optFlags = [["help", "h"]]
+    optFlags = [["help", "h"],
+                ]
 
     optParameters = [
         ["reportfile", "o", "report.yaml", "report file name"],
@@ -63,6 +64,10 @@ class Options(usage.Options, app.ReactorSelectionMixin):
         self['test'] = None
         usage.Options.__init__(self)
 
+    def opt_asciilulz(self):
+        from ooni.utils import logo
+        print logo.getlogo()
+
     def opt_spew(self):
         """
         Print an insanely verbose log of everything that happens.  Useful
@@ -73,6 +78,7 @@ class Options(usage.Options, app.ReactorSelectionMixin):
     def parseArgs(self, *args):
         try:
             self['test'] = args[0]
+
             self['subArgs'] = args[1:]
         except:
             raise usage.UsageError("No test filename specified!")
@@ -97,4 +103,3 @@ def run():
         orunner = runner.ORunner(cases, options[idx], config)
         orunner.run()
 
-





More information about the tor-commits mailing list