You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

update_manager.py 580 B

1234567891011121314151617
  1. # For license information, please see license.txt
  2. from __future__ import unicode_literals
  3. import webnotes
  4. from webnotes import _
  5. @webnotes.whitelist(allow_roles=["System Manager", "Administrator"])
  6. def update_this_app():
  7. import conf
  8. if hasattr(conf, "expires_on"):
  9. return _("This feature is only applicable to self hosted instances")
  10. from webnotes.utils import execute_in_shell, cstr, get_base_path
  11. err, out = execute_in_shell("cd %s && exec ssh-agent lib/wnf.py --update origin master" % \
  12. (get_base_path(),))
  13. return "\n".join(filter(None, [cstr(err), cstr(out)]))