File tree 1 file changed +11
-9
lines changed
Filter options
1 file changed +11
-9
lines changed
Original file line number Diff line number Diff line change 12
12
CELERY_RESULT_BACKEND = os .environ ['REDIS_URL' ])
13
13
14
14
15
-
16
15
@app .task (rate_limit = "1/m" )
17
16
def setup_cpython_repo ():
18
- subprocess .check_output (
19
- f"git clone https://{ os .environ .get ('GH_AUTH' )} :x-oauth-basic@github.com/miss-islington/cpython.git" .split ())
20
- subprocess .check_output ("git config --global user.email 'mariatta.wijaya+miss-islington@gmail.com'" .split ())
21
- subprocess .check_output (["git" , "config" , "--global" , "user.name" , "'Miss Islington (bot)'" ])
22
- os .chdir ('./cpython' )
23
- subprocess .check_output (
24
- f"git remote add upstream https://{ os .environ .get ('GH_AUTH' )} :x-oauth-basic@github.com/python/cpython.git" .split ())
25
- print ("Finished setting up CPython Repo" )
17
+ if "cpython" not in os .listdir ('.' ):
18
+ subprocess .check_output (
19
+ f"git clone https://{ os .environ .get ('GH_AUTH' )} :x-oauth-basic@github.com/miss-islington/cpython.git" .split ())
20
+ subprocess .check_output ("git config --global user.email 'mariatta.wijaya+miss-islington@gmail.com'" .split ())
21
+ subprocess .check_output (["git" , "config" , "--global" , "user.name" , "'Miss Islington (bot)'" ])
22
+ os .chdir ('./cpython' )
23
+ subprocess .check_output (
24
+ f"git remote add upstream https://{ os .environ .get ('GH_AUTH' )} :x-oauth-basic@github.com/python/cpython.git" .split ())
25
+ print ("Finished setting up CPython Repo" )
26
+ else :
27
+ print ("cpython directory already exists" )
26
28
27
29
28
30
@app .task (rate_limit = "1/m" )
You can’t perform that action at this time.
0 commit comments