r50353 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50352‎ | r50353 | r50354 >
Date:23:43, 8 May 2009
Author:tomasz
Status:deferred
Tags:
Comment:
fixing hostname lookup and adding newline
Modified paths:
  • /trunk/backup/WikiDump.py (modified) (history)

Diff [purge]

Index: trunk/backup/WikiDump.py
@@ -3,6 +3,7 @@
44 import os
55 import re
66 import smtplib
 7+import socket
78 import sys
89 import threading
910 import time
@@ -256,7 +257,7 @@
257258 if not os.path.isdir(self.privateDir()):
258259 raise
259260 f = atomicCreate(self.lockFile(), "w")
260 - f.write("%s.%d" % (os.getenv("HOSTNAME"), os.getpid()))
 261+ f.write("%s %d\n" % (socket.getfqdn(), os.getpid()))
261262 f.close()
262263
263264 self.watchdog = LockWatchdog(self.lockFile())

Status & tagging log