Dear Jeremy,
You are looking in the wrong place for clues why your setup isn't
working and make wrong assumptions that confuse people on the mailing
lists.
The mysql and radius accounting are enabled in modules/accounting.py
at lines 17 and 18
from radius import *
from mysql import *
Regards,
Adrian
On Feb 24, 2007, at 5:31 PM, Jeremy McNamara wrote:
Adrian Georgescu wrote:
Jeremy,
Both mysql and radius accounting are enabled through
configuration. You do not have to change any line of code to make
the accounting working. I hope other people on the list can
provide you with some help with configuration for your operating
system, python and mysql client version.
Totally W R O N G!
Let me detail code directly from the v1.8.2 tarball:
## We use this to overwrite some of the settings above on a local
basis if needed
readSettings('Accounting', AccountingConfig)
readSettings('Database', DatabaseConfig)
#try:
# from mysql import *
#except ImportError:
# if AccountingConfig.accounting == 'database':
# error("The MySQLdb module which is required to do
accounting is missing")
# raise
#try:
# from radius import *
#except ImportError:
# if AccountingConfig.accounting == 'radius':
# error("The pyrad module which is required to do accounting
is missing")
# raise
ModulesPath = os.path.realpath((os.path.dirname(__file__) or '.'))
ProgramName = os.path.splitext(os.path.basename(sys.argv[0] or
'python'))[0]
I am by no means a python expert but it seems # is a comment
character.
Someone please enlighten me how commented code can be turned back
on via configuration. I am dying to know - Seriously.
Jeremy McNamara