Skip to content

DEBUG in common.py dealt as str after loaded from config file #91

@oplier

Description

@oplier

Hello Charles,

In my environment (Python 2.7), I found that variable DEBUG is recognized as str type instead of Bool type, after setting debug loaded from config file (".git\gitcc"):

DEBUG = cfg.getCore('debug', True)

Then when calling function debug, regardless of the setting value, it will enter the if case and do the print action:

git-cc/git_cc/common.py

Lines 72 to 74 in 9db2037

def debug(string):
if DEBUG:
print(string)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions