mirror of https://github.com/MISP/PyMISP
chg: Rename master -> main
parent
cc16f2ed24
commit
16cbb93867
|
@ -182,12 +182,16 @@ class PyMISP:
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def pymisp_version_master(self) -> Dict:
|
def pymisp_version_master(self) -> Dict:
|
||||||
|
return self.pymisp_version_main
|
||||||
|
|
||||||
|
@property
|
||||||
|
def pymisp_version_main(self) -> Dict:
|
||||||
"""Get the most recent version of PyMISP from github"""
|
"""Get the most recent version of PyMISP from github"""
|
||||||
r = requests.get('https://raw.githubusercontent.com/MISP/PyMISP/master/pymisp/__init__.py')
|
r = requests.get('https://raw.githubusercontent.com/MISP/PyMISP/main/pymisp/__init__.py')
|
||||||
if r.status_code == 200:
|
if r.status_code == 200:
|
||||||
version = re.findall("__version__ = '(.*)'", r.text)
|
version = re.findall("__version__ = '(.*)'", r.text)
|
||||||
return {'version': version[0]}
|
return {'version': version[0]}
|
||||||
return {'error': 'Impossible to retrieve the version of the master branch.'}
|
return {'error': 'Impossible to retrieve the version of the main branch.'}
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def misp_instance_version(self) -> Dict:
|
def misp_instance_version(self) -> Dict:
|
||||||
|
|
Loading…
Reference in New Issue