Add --debug option to replace TOOT_DEBUG env - toot - Unnamed repository; edit this file 'description' to name the repository.
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit e4c3a8504599432b65c8e1c21aab644aec3327b1
 (DIR) parent 3b13c4914264260987ba2cfd0503aa4262876bca
 (HTM) Author: Ivan Habunek <ivan@habunek.com>
       Date:   Sat, 26 Aug 2017 15:12:32 +0200
       
       Add --debug option to replace TOOT_DEBUG env
       
       Diffstat:
         CHANGELOG.md                        |       8 +++++++-
         toot/console.py                     |       8 +++++++-
       
       2 files changed, 14 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/CHANGELOG.md b/CHANGELOG.md
       @@ -1,10 +1,16 @@
        Changelog
        ---------
        
       +**0.14.0 (TBA)**
       +
       +* Add `--debug` option to enable debug logging instead of using the `TOOT_DEBUG`
       +  environment variable.
       +
        **0.13.0 (2017-08-26)**
        
        * Allow passing `--instance` and `--email` to login command
       -* Add `login_browser` command for proper two factor authentication through the browser (#19, #23)
       +* Add `login_browser` command for proper two factor authentication through the
       +  browser (#19, #23)
        
        **0.12.0 (2017-05-08)**
        
 (DIR) diff --git a/toot/console.py b/toot/console.py
       @@ -31,6 +31,11 @@ common_args = [
                "help": "don't use ANSI colors in output",
                "action": 'store_true',
                "default": False,
       +    }),
       +    (["--debug"], {
       +        "help": "show debug log in console",
       +        "action": 'store_true',
       +        "default": False,
            })
        ]
        
       @@ -279,7 +284,8 @@ def run_command(app, user, name, args):
        
        
        def main():
       -    if os.getenv('TOOT_DEBUG'):
       +    # Enable debug log if --debug is in args
       +    if "--debug" in sys.argv:
                logging.basicConfig(level=logging.DEBUG)
        
            # If something is piped in, append it to commandline arguments