r101588 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101587‎ | r101588 | r101589 >
Date:06:26, 2 November 2011
Author:laner
Status:deferred
Tags:
Comment:
Add missing import and only write an export for a project if it has instances to share with.
Modified paths:
  • /trunk/tools/subversion/user-management/manage-exports (modified) (history)

Diff [purge]

Index: trunk/tools/subversion/user-management/manage-exports
@@ -1,5 +1,5 @@
22 #!/usr/bin/python
3 -import sys, traceback, ldapsupportlib, os, homedirectorymanager
 3+import sys, traceback, ldapsupportlib, os, homedirectorymanager, datetime
44 from optparse import OptionParser
55 from subprocess import call
66
@@ -63,7 +63,8 @@
6464 for host in hostdata:
6565 host_ip = host[1]["aRecord"][0]
6666 hosts.append(host_ip + "(rw,no_subtree_check)")
67 - projects.append(self.basedir + project_name + " " + " ".join(hosts) + "\n")
 67+ if hosts:
 68+ projects.append(self.basedir + project_name + " " + " ".join(hosts) + "\n")
6869 exports = open('/etc/exports', 'w')
6970 exports.writelines(projects)
7071 exports.close()

Status & tagging log