chg: Rename master -> main

pull/604/head
Raphaël Vinot 2020-06-16 14:58:38 +02:00
parent cc16f2ed24
commit 16cbb93867
1 changed files with 6 additions and 2 deletions

View File

@ -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: