Commit 475584bc authored by Jim Fulton's avatar Jim Fulton

Fix bug that caused error when no Extensions directory.

parent 377871fc
......@@ -169,22 +169,23 @@ class Product(Folder):
pp=id+'.'
lpp=len(pp)
ed=os.path.join(SOFTWARE_HOME,'Extensions')
for name in os.listdir(ed):
suffix=''
if name[:lpp]==pp:
path=os.path.join(ed, name)
try:
f=open(path)
data=f.read()
f.close()
if name[-3:]=='.py':
data=rot.encrypt(zlib.compress(data))
suffix='p'
except: data=None
if data:
ar.add("%sExtensions/%s%s" %
(prefix,name[lpp:],suffix),
data)
if os.path.exists(ed):
for name in os.listdir(ed):
suffix=''
if name[:lpp]==pp:
path=os.path.join(ed, name)
try:
f=open(path)
data=f.read()
f.close()
if name[-3:]=='.py':
data=rot.encrypt(zlib.compress(data))
suffix='p'
except: data=None
if data:
ar.add("%sExtensions/%s%s" %
(prefix,name[lpp:],suffix),
data)
# version.txt
ar.add(prefix+'version.txt', self.version)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment