c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #15923
[Bug 716710] Re: [TRUNK 3353] dont more support multiple addons path
** Description changed:
config.py
if not self.options['addons_path'] or self.options['addons_path']=='None':
self.options['addons_path'] = os.path.join(self.options['root_path'], 'addons')
else:
self.options['addons_path'] = os.path.abspath(os.path.expanduser(os.path.expandvars(self.options['addons_path'])))
The Else dont support multipath (supporting before, and still support
after my correction)
Correction
if not self.options['addons_path'] or self.options['addons_path']=='None':
self.options['addons_path'] = os.path.join(self.options['root_path'], 'addons')
else:
o = self.options['addons_path']
self.options['addons_path'] = ''
for x in o.split(','):
self.options['addons_path'] = ','.join([self.options['addons_path'], os.path.abspath(os.path.expanduser(os.path.expandvars(x)))])
So is not the better way, but atm i dont care i need that work.
ps : i know this is a trunk, but before commit branch on trunk no test
done to ensure all functionality follow ?
+
+
+ I got the some problem on windows installation I fix it in this way:
+ under config.py:
+
+ def _check_addons_path(self, option, opt, value, parser):
+ for path in value.split(','):
+ res = os.path.abspath(os.path.expanduser(path))
+ if not os.path.exists(res):
+ raise optparse.OptionValueError("option %s: no such directory: %r" % (opt, value))
+
+ contains_addons = False
+ for f in os.listdir(res):
+ modpath = os.path.join(res, f)
+ if os.path.isdir(modpath) and \
+ os.path.exists(os.path.join(modpath, '__init__.py')) and \
+ (os.path.exists(os.path.join(modpath, '__openerp__.py')) or \
+ os.path.exists(os.path.join(modpath, '__terp__.py'))):
+
+ contains_addons = True
+ break
+
+ if not contains_addons:
+ raise optparse.OptionValueError("option %s: The addons-path %r does not seem to a be a valid Addons Directory!" % (opt, value))
** Tags added: addons-path error startup
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/716710
Title:
[TRUNK 3353] dont more support multiple addons path
Status in OpenERP Server:
New
Bug description:
config.py
if not self.options['addons_path'] or self.options['addons_path']=='None':
self.options['addons_path'] = os.path.join(self.options['root_path'], 'addons')
else:
self.options['addons_path'] = os.path.abspath(os.path.expanduser(os.path.expandvars(self.options['addons_path'])))
The Else dont support multipath (supporting before, and still support
after my correction)
Correction
if not self.options['addons_path'] or self.options['addons_path']=='None':
self.options['addons_path'] = os.path.join(self.options['root_path'], 'addons')
else:
o = self.options['addons_path']
self.options['addons_path'] = ''
for x in o.split(','):
self.options['addons_path'] = ','.join([self.options['addons_path'], os.path.abspath(os.path.expanduser(os.path.expandvars(x)))])
So is not the better way, but atm i dont care i need that work.
ps : i know this is a trunk, but before commit branch on trunk no test
done to ensure all functionality follow ?
I got the some problem on windows installation I fix it in this way:
under config.py:
def _check_addons_path(self, option, opt, value, parser):
for path in value.split(','):
res = os.path.abspath(os.path.expanduser(path))
if not os.path.exists(res):
raise optparse.OptionValueError("option %s: no such directory: %r" % (opt, value))
contains_addons = False
for f in os.listdir(res):
modpath = os.path.join(res, f)
if os.path.isdir(modpath) and \
os.path.exists(os.path.join(modpath, '__init__.py')) and \
(os.path.exists(os.path.join(modpath, '__openerp__.py')) or \
os.path.exists(os.path.join(modpath, '__terp__.py'))):
contains_addons = True
break
if not contains_addons:
raise optparse.OptionValueError("option %s: The addons-path %r does not seem to a be a valid Addons Directory!" % (opt, value))
References