mirror of https://github.com/MISP/PyMISP
chg: Rename master -> main
parent
cc16f2ed24
commit
16cbb93867
|
@ -182,12 +182,16 @@ class PyMISP:
|
|||
|
||||
@property
|
||||
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"""
|
||||
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:
|
||||
version = re.findall("__version__ = '(.*)'", r.text)
|
||||
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
|
||||
def misp_instance_version(self) -> Dict:
|
||||
|
|
Loading…
Reference in New Issue