88import logging
99import tempfile
1010
11- logging .basicConfig (level = logging .INFO ) # DEBUG => print ALL msgs
12- logging .debug ('This message should go to the log file' )
13- logging .info ('So should this' )
14- logging .warning ('And this, too' )
11+ logging .basicConfig (level = logging .ERROR ) # DEBUG => print ALL msgs
1512
1613def get_list_of_comitted_files ():
1714 """
@@ -79,8 +76,8 @@ def checker():
7976
8077 #Скопируем сначало просто структуру каталогов.
8178 if not os .path .exists (dirsource ):
82- shutil . copytree ( os .path . curdir , dirsource , False , _copyonlydirs )
83- #для каждого файла определим
79+ os .mkdir ( dirsource )
80+ #для каждого файла определим новую папку.
8481 newsourcepath = os .path .join (dirsource , newdirname , basename )
8582 logging .info ("create new dir %s" % newsourcepath )
8683 if not os .path .exists (newsourcepath ):
@@ -98,14 +95,13 @@ def checker():
9895 logging .info (V8Reader )
9996 tempbat = tempfile .mktemp (".bat" )
10097 logging .info (tempbat )
101-
98+
10299 with open (tempbat , 'w' , encoding = 'cp866' ) as temp :
103100 temp .write ('@echo off\n ' )
104101 temp .write (format ('"%s" %s /DisableStartupMessages %s %s' % (pathbin1c , base , V8Reader , formatstring )))
105102 temp .close ()
106- result = subprocess .check_call (['cmd.exe' , '/K ' , tempbat ])
103+ result = subprocess .check_call (['cmd.exe' , '/C ' , tempbat ])
107104 result = subprocess .check_call (['git' , 'add' , newsourcepath ])
108-
109105 #shutil.copyfile(filename, os.path.join(newsourcepath, fullbasename))
110106
111107
0 commit comments