(self)
| 163 | |
| 164 | class gitpull: |
| 165 | def GET(self): |
| 166 | root = os.path.join(os.path.dirname(openlibrary.__file__), os.path.pardir) |
| 167 | root = os.path.normpath(root) |
| 168 | |
| 169 | p = subprocess.Popen( |
| 170 | "cd %s && git pull" % root, |
| 171 | shell=True, |
| 172 | stdout=subprocess.PIPE, |
| 173 | stderr=subprocess.STDOUT, |
| 174 | ) |
| 175 | out = p.stdout.read() |
| 176 | p.wait() |
| 177 | return "<pre>" + web.websafe(out) + "</pre>" |
| 178 | |
| 179 | |
| 180 | class reload: |