Skip to content

Commit

Permalink
fixed local check_update
Browse files Browse the repository at this point in the history
  • Loading branch information
LeLunZ committed Mar 10, 2021
1 parent a4a8659 commit 5eaa52a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion pymoodle_jku/pymoodle.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ def check_update():
from packaging.version import parse as parse_version
from sty import fg
from json.decoder import JSONDecodeError
from importlib.metadata import PackageNotFoundError

package = 'pymoodle-jku'
repo_url = f'LeLunZ/{package}-linz'
installed_version = version(package)
try:
installed_version = version(package)
response = requests.get(f'https://api.github.com/repos/{repo_url}/releases/latest')
current_version = response.json()['tag_name']
c_version = parse_version(current_version)
Expand All @@ -32,6 +33,8 @@ def check_update():
pass
except JSONDecodeError:
pass
except PackageNotFoundError:
pass


def main():
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
long_description_content_type='text/markdown',
long_description=long_description,
packages=['pymoodle_jku', 'pymoodle_jku.classes', 'pymoodle_jku.client', 'pymoodle_jku.utils'],
version='1.1.2',
version='1.1.3',
license='BSD 3-Clause',
description='A client for the moodle page of JKU Linz.',
author='LeLunZ',
author_email='[email protected]',
url='https://github.com/LeLunZ/pymoodle-jku-linz',
download_url='https://github.com/LeLunZ/pymoodle-jku-linz/archive/1.1.2.tar.gz',
download_url='https://github.com/LeLunZ/pymoodle-jku-linz/archive/1.1.3.tar.gz',
keywords=['moodle', 'jku', 'linz', 'jku linz'],
install_requires=requirements,
python_requires='>=3.8',
Expand Down

0 comments on commit 5eaa52a

Please sign in to comment.