On Thu, Nov 06, 2003 at 04:57:12PM +0000, Richard Barrett wrote: > > On Thursday, November 6, 2003, at 05:43 pm, John Poltorak wrote: > > > > > > > I'm getting an error in LockFile.py at this point (line 180) :- > > > > self.__tmpfname = '%s.%s.%d' % ( > > lockfile, socket.gethostname(), os.getpid()) > > > > It looks as though the function socket.gethostname() is causing this > > error. > > > > How can I display the value returned by this funtion and where should > > it > > be retrieved from? ie should it be using $HOSTNAME ? > > > > socket is a standard Python module. Its gethostname() function should > return the same as the hostname shell command. From the command line > you should be able to run python and get something like this:
Many thanks for this. > [EMAIL PROTECTED]:~> hostname > mailman2 > [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 socket > >>> socket.gethostname() > 'mailman2' Where does value originate and should it match anything within Mailman's configuration? Is there any way to dump the value of self.__tmpfname to the logfile from the lines above ? This is what currently appears in the error log:- admin(648): File "../Mailman/MailList.py", line 817, in __save admin(648): fname_tmp = fname + '.tmp.%s.%d' % (socket.gethostname(), os.getpid()) admin(648): error: (14, 'Bad address') I'm assuming that socket.gethostname() is the culprit. -- John ------------------------------------------------------ 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
