Skip to content

Commit 00ef273

Browse files
author
Alexander Smishlajev
committed
fix .load_extensions():
cannot expect existing 'extensions' subdirectory because it is not created by default tracker install
1 parent 22b1526 commit 00ef273

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

roundup/instance.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: instance.py,v 1.19 2004-07-27 11:34:11 a1s Exp $
18+
# $Id: instance.py,v 1.20 2004-09-24 08:21:22 a1s Exp $
1919

2020
'''Tracker handling (open tracker).
2121
@@ -73,12 +73,13 @@ def open(self, name):
7373

7474
def load_extensions(self, parent, dirname):
7575
dirname = os.path.join(self.tracker_home, dirname)
76-
for name in os.listdir(dirname):
77-
if not name.endswith('.py'):
78-
continue
79-
vars = {}
80-
self._load_python(os.path.join(dirname, name), vars)
81-
vars['init'](parent)
76+
if os.path.isdir(dirname):
77+
for name in os.listdir(dirname):
78+
if not name.endswith('.py'):
79+
continue
80+
vars = {}
81+
self._load_python(os.path.join(dirname, name), vars)
82+
vars['init'](parent)
8283

8384
def init(self, adminpw):
8485
db = self.open('admin')

0 commit comments

Comments
 (0)