equal
deleted
inserted
replaced
152 it's also possible to return a same hash for different file contents for |
152 it's also possible to return a same hash for different file contents for |
153 some carefully crafted situation. |
153 some carefully crafted situation. |
154 |
154 |
155 for chgserver, it is designed that once mtimehash changes, the server is |
155 for chgserver, it is designed that once mtimehash changes, the server is |
156 considered outdated immediately and should no longer provide service. |
156 considered outdated immediately and should no longer provide service. |
|
157 |
|
158 mtimehash is not included in confighash because we only know the paths of |
|
159 extensions after importing them (there is imp.find_module but that faces |
|
160 race conditions). We need to calculate confighash without importing. |
157 """ |
161 """ |
158 def trystat(path): |
162 def trystat(path): |
159 try: |
163 try: |
160 st = os.stat(path) |
164 st = os.stat(path) |
161 return (st.st_mtime, st.st_size) |
165 return (st.st_mtime, st.st_size) |