aboutsummaryrefslogtreecommitdiff
path: root/onionshare/common.py
diff options
context:
space:
mode:
Diffstat (limited to 'onionshare/common.py')
-rw-r--r--onionshare/common.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/onionshare/common.py b/onionshare/common.py
index fcb9ca6d..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)
@@ -485,7 +485,7 @@ class Common(object):
return total_size
-class ShutdownTimer(threading.Thread):
+class AutoStopTimer(threading.Thread):
"""
Background thread sleeps t hours and returns.
"""
@@ -498,6 +498,6 @@ class ShutdownTimer(threading.Thread):
self.time = time
def run(self):
- self.common.log('Shutdown Timer', 'Server will shut down after {} seconds'.format(self.time))
+ self.common.log('AutoStopTimer', 'Server will shut down after {} seconds'.format(self.time))
time.sleep(self.time)
return 1