From 2ae21f225ea93578303e2ee02c19a9590041676b Mon Sep 17 00:00:00 2001 From: Seblu Date: Thu, 3 Feb 2011 17:00:41 +0100 Subject: [PATCH] add --no-debug (-D) option --- README | 18 ++++++++---------- bin/cc-cli | 4 +++- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README b/README index 8b786a9..21444af 100644 --- a/README +++ b/README @@ -15,16 +15,14 @@ To quickly connect to mulptiple servers, you can define a profile by server. ======= Loading ======= -Profile is loaded in this order: -1 load [cli] profile in ~/.config/cc-cli/profile -2 load profile specified by option profile in [cli] profile -3 load profile specified by environment -4 load profile specified on command line -5 load options from environment -6 load options from command line - -Please note: Environment variable CC_DEBUG is loaded before every work to be -able to activate an early debugging. +Configuration is loaded in this order: +1 Check CC_DEBUG, to set early debugging mode +2 load [cli] profile in ~/.config/cc-cli/profile +3 load profile specified by option profile in [cli] profile +4 load profile specified by environment +5 load profile specified on command line +6 load options from environment +7 load options from command line =========== Environment diff --git a/bin/cc-cli b/bin/cc-cli index 30db886..1a2eed7 100755 --- a/bin/cc-cli +++ b/bin/cc-cli @@ -42,6 +42,8 @@ try: version=cccli.version) oparser.add_option("-d", "--debug", action="store_true",dest="debug", help="Debug mode") + oparser.add_option("-D", "--no-debug", action="store_false",dest="debug", + help="Unset debug mode") oparser.add_option("-l", "--login",action="store",dest="login", help="Server login") oparser.add_option("-H", "--hostname",action="store",dest="server", @@ -105,7 +107,7 @@ try: for i in [ x.dest for x in oparser.option_list if x.dest ]: if hasattr(options, i): o = getattr(options, i) - if o: + if o is not None: settings[i] = o # debug stuff -- GitLab