Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import subprocess
- import os
- if __name__=="__main__":
- backup_folder_repo = 'C:/bitbucket_backup/chameleon'
- if os.path.exists(backup_folder_repo):
- print ('Folder exists: ', os.path.exists(backup_folder_repo))
- output = subprocess.call(['git', 'init', '--bare'], cwd=backup_folder_repo)
- OUTPUT:
- =================== RESTART: C:/Users/fabio/Qsync/teste.py ===================
- Folder exists: True
- Traceback (most recent call last):
- File "C:/Users/fabio/Qsync/teste.py", line 8, in <module>
- output = subprocess.call(['git', 'init', '--bare'], cwd=backup_folder_repo)
- File "C:\Users\fabio\AppData\Local\Programs\Python\Python36-32\lib\subprocess.py", line 267, in call
- with Popen(*popenargs, **kwargs) as p:
- File "C:\Users\fabio\AppData\Local\Programs\Python\Python36-32\lib\subprocess.py", line 707, in __init__
- restore_signals, start_new_session)
- File "C:\Users\fabio\AppData\Local\Programs\Python\Python36-32\lib\subprocess.py", line 990, in _execute_child
- startupinfo)
- FileNotFoundError: [WinError 2] O sistema não conseguiu localizar o ficheiro especificado
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement