Fix the search for holidays.xml in libholiday.

svn: r11836
This commit is contained in:
Brian Matherly 2009-02-04 05:13:20 +00:00
parent 7050989e75
commit a6fafa5409

View File

@ -132,25 +132,15 @@ 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)