1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-06 00:53:04 +00:00

disable debug in tests with env var

This commit is contained in:
deadc0de6
2019-03-13 09:00:43 +01:00
parent bf23f6b341
commit b19f115351
27 changed files with 43 additions and 35 deletions

View File

@@ -18,6 +18,8 @@ from dotdrop.config import Cfg
ENV_PROFILE = 'DOTDROP_PROFILE'
ENV_CONFIG = 'DOTDROP_CONFIG'
ENV_NOBANNER = 'DOTDROP_NOBANNER'
ENV_DEBUG = 'DOTDROP_DEBUG'
ENV_NODEBUG = 'DOTDROP_FORCE_NODEBUG'
BACKUP_SUFFIX = '.dotdropbak'
PROFILE = socket.gethostname()
@@ -98,6 +100,10 @@ class Options(AttrMonitor):
self.args = docopt(USAGE, version=VERSION)
self.log = Logger()
self.debug = self.args['--verbose']
if not self.debug and ENV_DEBUG in os.environ:
self.debug = True
if ENV_NODEBUG in os.environ:
self.debug = False
self.profile = self.args['--profile']
self.confpath = os.path.expanduser(self.args['--cfg'])
if self.debug: