Index: trunk/tools/subversion/user-management/manage-exports |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | #!/usr/bin/python |
3 | | -import sys, traceback, ldapsupportlib, os, homedirectorymanager |
| 3 | +import sys, traceback, ldapsupportlib, os, homedirectorymanager, datetime |
4 | 4 | from optparse import OptionParser |
5 | 5 | from subprocess import call |
6 | 6 | |
— | — | @@ -63,7 +63,8 @@ |
64 | 64 | for host in hostdata: |
65 | 65 | host_ip = host[1]["aRecord"][0] |
66 | 66 | 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") |
68 | 69 | exports = open('/etc/exports', 'w') |
69 | 70 | exports.writelines(projects) |
70 | 71 | exports.close() |