Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
oplier opened this issue May 8, 2019 · 1 comment
Open

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

oplier opened this issue May 8, 2019 · 1 comment

Comments

@oplier
Copy link
Contributor

oplier commented May 8, 2019

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)

@charleso
Copy link
Owner

charleso commented May 8, 2019

@oplier Thanks for the issue, and I'm sorry the git-cc code is so horrible. :( I'm not really actively maintaining this, but if you send me a PR I will happily merge if it looks sensible.

oplier added a commit to oplier/git-cc that referenced this issue May 8, 2019
oplier added a commit to oplier/git-cc that referenced this issue May 8, 2019
charleso added a commit that referenced this issue May 9, 2019
Fix issue #91 DEBUG in common.py dealt as str after loaded from config file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants