diff options
author | Micah Lee <micah@micahflee.com> | 2019-04-18 19:53:21 -0700 |
---|---|---|
committer | Micah Lee <micah@micahflee.com> | 2019-04-18 19:53:21 -0700 |
commit | 758c6405614462faf68b34dc3ae23f40464da4bb (patch) | |
tree | b194c7c5995a25c32fab01a7854ee5e224c60a41 /onionshare | |
parent | d25d97095a6dd4246100d33620ec31c0e2813507 (diff) | |
download | onionshare-758c6405614462faf68b34dc3ae23f40464da4bb.tar.gz onionshare-758c6405614462faf68b34dc3ae23f40464da4bb.zip |
Rename debug to verbose in all relevant places
Diffstat (limited to 'onionshare')
-rw-r--r-- | onionshare/__init__.py | 8 | ||||
-rw-r--r-- | onionshare/common.py | 8 | ||||
-rw-r--r-- | onionshare/web/web.py | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/onionshare/__init__.py b/onionshare/__init__.py index db97f46d..248ab68c 100644 --- a/onionshare/__init__.py +++ b/onionshare/__init__.py @@ -61,7 +61,7 @@ def main(cwd=None): parser.add_argument('--stealth', action='store_true', dest='stealth', help=strings._("help_stealth")) parser.add_argument('--receive', action='store_true', dest='receive', help=strings._("help_receive")) parser.add_argument('--config', metavar='config', default=False, help=strings._('help_config')) - parser.add_argument('--debug', action='store_true', dest='debug', help=strings._("help_debug")) + parser.add_argument('-v', '--verbose', action='store_true', dest='verbose', help=strings._("help_verbose")) parser.add_argument('filename', metavar='filename', nargs='*', help=strings._('help_filename')) args = parser.parse_args() @@ -70,7 +70,7 @@ def main(cwd=None): filenames[i] = os.path.abspath(filenames[i]) local_only = bool(args.local_only) - debug = bool(args.debug) + verbose = bool(args.verbose) stay_open = bool(args.stay_open) autostart_timer = int(args.autostart_timer) autostop_timer = int(args.autostop_timer) @@ -108,8 +108,8 @@ def main(cwd=None): # Re-load the strings, in case the provided config has changed locale strings.load_strings(common) - # Debug mode? - common.debug = debug + # Verbose mode? + common.verbose = verbose # Create the Web object web = Web(common, False, mode) diff --git a/onionshare/common.py b/onionshare/common.py index 02668507..325f11d4 100644 --- a/onionshare/common.py +++ b/onionshare/common.py @@ -36,8 +36,8 @@ class Common(object): """ The Common object is shared amongst all parts of OnionShare. """ - def __init__(self, debug=False): - self.debug = debug + def __init__(self, verbose=False): + self.verbose = verbose # The platform OnionShare is running on self.platform = platform.system() @@ -57,9 +57,9 @@ class Common(object): def log(self, module, func, msg=None): """ - If debug mode is on, log error messages to stdout + If verbose mode is on, log error messages to stdout """ - if self.debug: + if self.verbose: timestamp = time.strftime("%b %d %Y %X") final_msg = "[{}] {}.{}".format(timestamp, module, func) diff --git a/onionshare/web/web.py b/onionshare/web/web.py index 7ce87108..adadf7d4 100644 --- a/onionshare/web/web.py +++ b/onionshare/web/web.py @@ -51,9 +51,9 @@ class Web(object): template_folder=self.common.get_resource_path('templates')) self.app.secret_key = self.common.random_string(8) - # Debug mode? - if self.common.debug: - self.debug_mode() + # Verbose mode? + if self.common.verbose: + self.verbose_mode() # Are we running in GUI mode? self.is_gui = is_gui @@ -193,7 +193,7 @@ class Web(object): self.slug = self.common.build_slug() self.common.log('Web', 'generate_slug', 'built random slug: "{}"'.format(self.slug)) - def debug_mode(self): + def verbose_mode(self): """ Turn on debugging mode, which will log flask errors to a debug file. """ |