mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 06:50:14 +00:00
Some refactoring
This commit is contained in:
parent
bb6e8fd4ce
commit
edc6f47758
19 changed files with 88 additions and 93 deletions
|
|
@ -7,9 +7,7 @@ See the file 'doc/COPYING' for copying permission
|
|||
|
||||
import os
|
||||
import re
|
||||
|
||||
from subprocess import PIPE
|
||||
from subprocess import Popen as execute
|
||||
import subprocess
|
||||
|
||||
def getRevisionNumber():
|
||||
"""
|
||||
|
|
@ -46,7 +44,7 @@ def getRevisionNumber():
|
|||
break
|
||||
|
||||
if not retVal:
|
||||
process = execute("git rev-parse --verify HEAD", shell=True, stdout=PIPE, stderr=PIPE)
|
||||
process = subprocess.Popen("git rev-parse --verify HEAD", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
stdout, _ = process.communicate()
|
||||
match = re.search(r"(?i)[0-9a-f]{32}", stdout or "")
|
||||
retVal = match.group(0) if match else None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue