Skip to content

Commit

Permalink
RF: do not just check if datalad.runtime.librarymode variable is defi…
Browse files Browse the repository at this point in the history
…ned, takes its bool

Otherwise even assigning =0 would make it into a library mode
  • Loading branch information
yarikoptic committed Oct 24, 2023
1 parent 09763b7 commit 05cdbd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion datalad/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def main(args=sys.argv):
# added new ones to consider
load_extensions()

if 'datalad.runtime.librarymode' in datalad.cfg:
if datalad.cfg.getbool('datalad.runtime', 'librarymode', False):
datalad.enable_librarymode()

if cmdlineargs.change_path is not None:
Expand Down
2 changes: 1 addition & 1 deletion datalad/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ def get_initialized_logger(self, logtarget=None):
logging.Logger
"""
import datalad
if 'datalad.runtime.librarymode' in datalad.cfg:
if datalad.cfg.getbool('datalad.runtime', 'librarymode', False):
return self.lgr

if not logtarget:
Expand Down

0 comments on commit 05cdbd9

Please sign in to comment.