[minor] chart_of_accounts.py for python3

This commit is contained in:
Rushabh Mehta 2018-05-23 16:14:18 +05:30
parent f7414519bb
commit 315dbd2ed1

View File

@ -123,6 +123,8 @@ def get_charts_for_country(country, with_standard=False):
for folder in folders:
path = os.path.join(os.path.dirname(__file__), folder)
if not os.path.exists(path):
continue
for fname in os.listdir(path):
fname = frappe.as_unicode(fname)
@ -130,6 +132,7 @@ def get_charts_for_country(country, with_standard=False):
with open(os.path.join(path, fname), "r") as f:
_get_chart_name(f.read())
# if more than one charts, returned then add the standard
if len(charts) != 1 or with_standard:
charts += ["Standard", "Standard with Numbers"]