Fix the search for holidays.xml in libholiday.
svn: r11836
This commit is contained in:
parent
7050989e75
commit
a6fafa5409
@ -132,27 +132,17 @@ class HolidayTable:
|
|||||||
|
|
||||||
# Look for holiday files in the user plugins directory and all
|
# Look for holiday files in the user plugins directory and all
|
||||||
# subdirectories.
|
# subdirectories.
|
||||||
holiday_full_path = os.path.join(const.USER_PLUGINS, holiday_file)
|
|
||||||
if os.path.exists(holiday_full_path):
|
|
||||||
HolidayTable.__holiday_files.append(holiday_full_path)
|
|
||||||
|
|
||||||
for (dirpath, dirnames, filenames) in os.walk(const.USER_PLUGINS):
|
for (dirpath, dirnames, filenames) in os.walk(const.USER_PLUGINS):
|
||||||
for directory in dirnames:
|
holiday_full_path = os.path.join(dirpath, holiday_file)
|
||||||
holiday_full_path = os.path.join(directory, holiday_file)
|
if os.path.exists(holiday_full_path):
|
||||||
if os.path.exists(holiday_full_path):
|
HolidayTable.__holiday_files.append(holiday_full_path)
|
||||||
HolidayTable.__holiday_files.append(holiday_full_path)
|
|
||||||
|
|
||||||
# Look for holiday files in the installation plugins directory and all
|
# Look for holiday files in the installation plugins directory and all
|
||||||
# subdirectories.
|
# subdirectories.
|
||||||
holiday_full_path = os.path.join(const.PLUGINS_DIR, holiday_file)
|
|
||||||
if os.path.exists(holiday_full_path):
|
|
||||||
HolidayTable.__holiday_files.append(holiday_full_path)
|
|
||||||
|
|
||||||
for (dirpath, dirnames, filenames) in os.walk(const.PLUGINS_DIR):
|
for (dirpath, dirnames, filenames) in os.walk(const.PLUGINS_DIR):
|
||||||
for directory in dirnames:
|
holiday_full_path = os.path.join(dirpath, holiday_file)
|
||||||
holiday_full_path = os.path.join(directory, holiday_file)
|
if os.path.exists(holiday_full_path):
|
||||||
if os.path.exists(holiday_full_path):
|
HolidayTable.__holiday_files.append(holiday_full_path)
|
||||||
HolidayTable.__holiday_files.append(holiday_full_path)
|
|
||||||
|
|
||||||
def __build_country_list(self):
|
def __build_country_list(self):
|
||||||
""" Generate the list of countries that have holiday information. """
|
""" Generate the list of countries that have holiday information. """
|
||||||
|
Loading…
Reference in New Issue
Block a user