Advertisement
SipriusPT

Untitled

Jul 24th, 2017
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.10 KB | None | 0 0
  1. import subprocess
  2. import os
  3.  
  4. if __name__=="__main__":
  5.     backup_folder_repo = 'C:/bitbucket_backup/chameleon'
  6.     if os.path.exists(backup_folder_repo):
  7.         print ('Folder exists: ', os.path.exists(backup_folder_repo))
  8.         output = subprocess.call(['git', 'init', '--bare'], cwd=backup_folder_repo)
  9. OUTPUT:
  10. =================== RESTART: C:/Users/fabio/Qsync/teste.py ===================
  11. Folder exists:  True
  12. Traceback (most recent call last):
  13.   File "C:/Users/fabio/Qsync/teste.py", line 8, in <module>
  14.     output = subprocess.call(['git', 'init', '--bare'], cwd=backup_folder_repo)
  15.   File "C:\Users\fabio\AppData\Local\Programs\Python\Python36-32\lib\subprocess.py", line 267, in call
  16.     with Popen(*popenargs, **kwargs) as p:
  17.   File "C:\Users\fabio\AppData\Local\Programs\Python\Python36-32\lib\subprocess.py", line 707, in __init__
  18.     restore_signals, start_new_session)
  19.   File "C:\Users\fabio\AppData\Local\Programs\Python\Python36-32\lib\subprocess.py", line 990, in _execute_child
  20.     startupinfo)
  21. FileNotFoundError: [WinError 2] O sistema não conseguiu localizar o ficheiro especificado
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement