How to disable gae python to check for updates every time I start a server in eclipse?

后端 未结 3 630
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-13 09:37

I just hate seeing this for 20sec every time I run my server: appcfg.py:393] Checking for updates to the SDK.

相关标签:
3条回答
  • 2021-02-13 09:40

    For anyone else looking for the answer, appcfg.py now has a command line switch:

    --skip_sdk_update_check
    

    happy coding!

    0 讨论(0)
  • 2021-02-13 09:52

    Create or edit the file .appcfg_nag in your home directory. Edit the first line to be:

    opt_in: false
    
    0 讨论(0)
  • 2021-02-13 10:05

    @Nick Jognson and @Joe answers both for me did not worked but here is how i fixed it for ENTERPRISES where user names get deleted and user profile gets deleted on every reboot.

    #!/usr/bin/env python
    from subprocess import Popen, PIPE 
    cmd = Popen('python.exe script.py', stdout=PIPE, stdin=PIPE, stderr=PIPE) 
    out, err = cmd.communicate("sendNOnENTER\nsendNOnENTER\n")
    print out
    print err
    

    Here script.py is executed and if it was asked to type Y or n you can use communicate method or second method is little bit nonsense but also works:

    import os
    from subprocess import Popen
    google_app_engine_update = 'c:/Python27/.appcfg_nag'
    if os.path.exists(google_app_engine_update):
      target = open(google_app_engine_update, 'r+')
    else:
      target = open(google_app_engine_update, 'w')
    
    line1 = 'opt_in: false'
    target.write(line1)
    target.close()
    Popen(['c:/Python27/python.exe', 'C:/google/devscript.py', arg1, arg2], shell=False)
    
    0 讨论(0)
提交回复
热议问题