On Saturday, October 25, 2003, at 07:41 pm, John Poltorak wrote:



Can someone help me out here?


I know this is an old version but there is a good reason for it.

Here is part of a Mailman error log:-


Oct 24 16:18:31 2003 admin(493):
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
admin(493): [----- Mailman Version: 2.0.13 -----]
admin(493): [----- Traceback ------]
admin(493): Traceback (most recent call last):
admin(493): File "/usr/local/mailman/scripts/driver", line 96, in run_main
admin(493): main()
admin(493): File "../Mailman/Cgi/admin.py", line 63, in main
admin(493): FormatAdminOverview()
admin(493): File "../Mailman/Cgi/admin.py", line 201, in FormatAdminOverview
admin(493): l = MailList.MailList(n, lock=0)
admin(493): File "../Mailman/MailList.py", line 73, in __init__
admin(493): self.InitTempVars(name)
admin(493): File "../Mailman/MailList.py", line 266, in InitTempVars
admin(493): withlogging = mm_cfg.LIST_LOCK_DEBUGGING)
admin(493): File "../Mailman/LockFile.py", line 180, in __init__
admin(493): self.__tmpfname = '%s.%s.%d' % (
admin(493): error: (14, 'Bad address')


^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
What is wrong here?


admin(493): [----- Python Information -----]
admin(493): sys.version = 2.2.3 (#0, May 31 2003, 23:15:53) [EMX GCC 2.8.1]
admin(493): sys.executable = C:\USR\LOCAL\PYTHON223\PYTHON.EXE
admin(493): sys.prefix = C:\USR\LOCAL\PYTHON223
admin(493): sys.exec_prefix= C:\USR\LOCAL\PYTHON223
admin(493): sys.path = C:\USR\LOCAL\PYTHON223
admin(493): sys.platform = os2emx
admin(493): [----- Environment Variables -----]
admin(493): ENDLIBPATH:
admin(493): COMSPEC: C:\OS2\CMD.EXE
admin(493): PYTHONPATH: /usr/local/mailman
admin(493): DPATH: c:\usr\parmlib;C:\IBMLAN\NETPROG;C:\IBMLAN;C:\MUGLIB;C:\MPTN;C:\IBMCOM; C:\OS2;C:\OS2\SYSTEM;C:\OS2\MDOS\WI
admin(493): SERVER_ADMIN: [EMAIL PROTECTED]
admin(493): SCRIPT_NAME: /mailman/admin
admin(493): ETC: C:\ETC
admin(493): SERVER_SIGNATURE: <address>Apache/2.0.44 (OS/2) PHP/4.3.1 Server at 213.152.37.92 Port 80</address>





LockFile.py contains:-


        self.__tmpfname = '%s.%s.%d' % (
            lockfile, socket.gethostname(), os.getpid())

How do I find the result of socket.gethostname() ?



socket is standard Python module with gethostname() one of the functions defined in it. See:


http://www.python.org/doc/current/lib/module-socket.html#l2h-2416

For instance on my machine, called mailman, and as UID mailman, I can run Python from the command line as follows:

[EMAIL PROTECTED]:~> hostname
mailman
[EMAIL PROTECTED]:~> python
Python 2.2.2 (#3, Feb 11 2003, 16:57:53)
[GCC 2.95.3 20010315 (SuSE)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys, os, socket
>>> socket.gethostname()
'mailman'
>>> os.getpid()
27450
>>> sys.exit()
[EMAIL PROTECTED]:~>

The above is on Linux and I assume that it should work in some similar fashion on OS2. If the above barfs when you try it using Python from the command line then you probably do not have a Mailman problem but a Python port or installation problem.


-- John
-----------------------------------------------------------------------
Richard Barrett                               http://www.openinfo.co.uk


------------------------------------------------------ Mailman-Users mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/

This message was sent to: [EMAIL PROTECTED]
Unsubscribe or change your options at
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Reply via email to