Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--manual doesn't respect --turn_off_color #12

Closed
GoogleCodeExporter opened this issue Mar 24, 2016 · 2 comments
Closed

--manual doesn't respect --turn_off_color #12

GoogleCodeExporter opened this issue Mar 24, 2016 · 2 comments

Comments

@GoogleCodeExporter
Copy link

pyp --manual --turn_off_color
is colored while it shouldn't

Problem is that reassignment of class Colors to NoColors is done after class 
Docs is defined.
One quite non intrusive solution is to modify Docs.manual as such so that 
manual text is evaluated only when called:

$ diff -u /usr/bin/pyp pyp
--- /usr/bin/pyp    2012-04-04 22:02:16.000000000 +0200
+++ pyp 2012-04-19 00:23:44.183598728 +0200
@@ -1390,7 +1390,7 @@
         '''

         if options.manual:
-            print Docs.manual
+            print Docs().manual()
             sys.exit()

         if options.unmodified_config:
@@ -1476,7 +1476,8 @@


 class Docs():
-    manual = ''' 
+    def manual(self):
+        return ''' 
     ===================================================================================
     PYED PIPER MANUAL



Original issue reported on code.google.com by yob...@gmail.com on 18 Apr 2012 at 10:27

@GoogleCodeExporter
Copy link
Author

ok, thanks for catching this, and especially for the code. we'll roll this out 
on the next revision.


Original comment by tobyro...@gmail.com on 18 Apr 2012 at 11:22

@GoogleCodeExporter
Copy link
Author

solved! thanks for catching this!

http://code.google.com/p/pyp/

Original comment by tobyro...@gmail.com on 26 Mar 2014 at 9:55

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant