Index: trunk/debs/wikimedia-task-dns-auth/gen-zones |
— | — | @@ -66,20 +66,20 @@ |
67 | 67 | |
68 | 68 | for file in os.listdir(templatedir): |
69 | 69 | filepath = os.path.join(templatedir, file) |
70 | | - zonefilepath = os.path.join(zonedir, file) |
| 70 | + zonefilepath = os.path.join(zonedir, file) |
71 | 71 | |
72 | 72 | # Only process regular files and symlinks |
73 | 73 | if not os.path.isfile(filepath): continue |
74 | 74 | |
75 | | - # Check file modification time |
76 | | - try: |
77 | | - if (os.path.getmtime(filepath) <= os.path.getmtime(zonefilepath) |
78 | | - and os.path.getmtime(langlist) <= os.path.getmtime(zonefilepath)): |
79 | | - continue |
80 | | - except OSError: |
81 | | - pass |
| 75 | + # Check file modification time |
| 76 | + try: |
| 77 | + if (os.path.getmtime(filepath) <= os.path.getmtime(zonefilepath) |
| 78 | + and os.path.getmtime(langlist) <= os.path.getmtime(zonefilepath)): |
| 79 | + continue |
| 80 | + except OSError: |
| 81 | + pass |
82 | 82 | |
83 | | - print 'Processing zone', file |
| 83 | + print 'Processing zone', file |
84 | 84 | |
85 | 85 | # Read the entire file in a string |
86 | 86 | template = open(filepath).read() |
— | — | @@ -88,6 +88,6 @@ |
89 | 89 | substs['$zonename'] = file |
90 | 90 | for var, value in substs.iteritems(): |
91 | 91 | template = template.replace(var, value) |
92 | | - |
| 92 | + |
93 | 93 | # Write zonefile |
94 | 94 | open(zonefilepath, 'w').write(header + template) |