MCPcopy Create free account
hub / github.com/internetarchive/openlibrary / GET

Method GET

openlibrary/plugins/admin/code.py:165–177  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

163
164class 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
180class reload:

Callers

nothing calls this directly

Calls 1

readMethod · 0.80

Tested by

no test coverage detected