[minor] fixes for import conf

This commit is contained in:
Anand Doshi
2013-09-24 17:17:39 +05:30
parent 0eb811a518
commit de8b6aadaf
10 changed files with 18 additions and 14 deletions

View File

@@ -115,7 +115,7 @@ def get_gdrive_flow():
from oauth2client.client import OAuth2WebServerFlow
from webnotes import conf
if not hasattr(conf, "gdrive_client_id"):
if not "gdrive_client_id" in conf:
webnotes.msgprint(_("Please set Google Drive access keys in") + " conf.py",
raise_exception=True)

View File

@@ -458,7 +458,7 @@ def send():
now_date = now_datetime().date()
from webnotes import conf
if hasattr(conf, "expires_on") and now_date > getdate(conf.expires_on):
if "expires_on" in conf and now_date > getdate(conf.expires_on):
# do not send email digests to expired accounts
return