Skip to content

Commit

Permalink
Update cobra.py
Browse files Browse the repository at this point in the history
程序执行前先git pull后再执行
fix FeeiCN#799
  • Loading branch information
PSoul authored May 8, 2018
1 parent fbd3ee8 commit cb351d7
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions cobra.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,20 @@
Implements cobra entry
:author: Feei <[email protected]>
:homepage: https://github.com/WhaleShark-Team/cobra
:homepage: https://github.com/FeeiCN/cobra
:license: MIT, see LICENSE for more details.
:copyright: Copyright (c) 2018 Feei. All rights reserved
"""
import re
import sys

from cobra import main
import os

if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
try:
os.system('git pull')
except:
pass
finally:
from cobra import main
sys.exit(main())

0 comments on commit cb351d7

Please sign in to comment.