mirror of
				https://github.com/sqlmapproject/sqlmap.git
				synced 2025-10-31 07:57:47 +03:00 
			
		
		
		
	Fixes #1470
This commit is contained in:
		
							parent
							
								
									d762098cce
								
							
						
					
					
						commit
						441196f360
					
				|  | @ -13,6 +13,7 @@ from subprocess import PIPE | ||||||
| from subprocess import Popen as execute | from subprocess import Popen as execute | ||||||
| 
 | 
 | ||||||
| from lib.core.common import dataToStdout | from lib.core.common import dataToStdout | ||||||
|  | from lib.core.common import getSafeExString | ||||||
| from lib.core.common import pollProcess | from lib.core.common import pollProcess | ||||||
| from lib.core.data import conf | from lib.core.data import conf | ||||||
| from lib.core.data import logger | from lib.core.data import logger | ||||||
|  | @ -41,10 +42,15 @@ def update(): | ||||||
|         logger.debug(debugMsg) |         logger.debug(debugMsg) | ||||||
| 
 | 
 | ||||||
|         dataToStdout("\r[%s] [INFO] update in progress " % time.strftime("%X")) |         dataToStdout("\r[%s] [INFO] update in progress " % time.strftime("%X")) | ||||||
|  | 
 | ||||||
|  |         try: | ||||||
|             process = execute("git checkout . && git pull %s HEAD" % GIT_REPOSITORY, shell=True, stdout=PIPE, stderr=PIPE) |             process = execute("git checkout . && git pull %s HEAD" % GIT_REPOSITORY, shell=True, stdout=PIPE, stderr=PIPE) | ||||||
|             pollProcess(process, True) |             pollProcess(process, True) | ||||||
|             stdout, stderr = process.communicate() |             stdout, stderr = process.communicate() | ||||||
|             success = not process.returncode |             success = not process.returncode | ||||||
|  |         except (IOError, OSError), ex: | ||||||
|  |             success = False | ||||||
|  |             stderr = getSafeExString(ex) | ||||||
| 
 | 
 | ||||||
|         if success: |         if success: | ||||||
|             import lib.core.settings |             import lib.core.settings | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user