mirror of
https://github.com/YunoHost/apps.git
synced 2024-09-03 20:06:07 +02:00
[mod] pep8
This commit is contained in:
parent
ce23a229b4
commit
e73958e53b
1 changed files with 10 additions and 9 deletions
|
@ -11,7 +11,7 @@ import requests
|
|||
from dateutil.parser import parse
|
||||
|
||||
|
||||
## Regular expression patterns
|
||||
# Regular expression patterns
|
||||
|
||||
"""GitHub repository URL."""
|
||||
re_github_repo = re.compile(
|
||||
|
@ -24,7 +24,7 @@ re_commit_author = re.compile(
|
|||
)
|
||||
|
||||
|
||||
## Helpers
|
||||
# Helpers
|
||||
|
||||
def fail(msg, retcode=1):
|
||||
"""Show failure message and exit."""
|
||||
|
@ -32,7 +32,7 @@ def fail(msg, retcode=1):
|
|||
sys.exit(retcode)
|
||||
|
||||
|
||||
## Main
|
||||
# Main
|
||||
|
||||
# Create argument parser
|
||||
parser = argparse.ArgumentParser(description='Process YunoHost application list.')
|
||||
|
@ -93,7 +93,7 @@ for app, info in apps_list.items():
|
|||
result_dict[app] = already_built_file[app]
|
||||
continue
|
||||
|
||||
## Hosted on GitHub
|
||||
# Hosted on GitHub
|
||||
github_repo = re_github_repo.match(app_url)
|
||||
if github_repo:
|
||||
owner = github_repo.group('owner')
|
||||
|
@ -131,7 +131,8 @@ for app, info in apps_list.items():
|
|||
else:
|
||||
commit_date = parse(info2['commit']['author']['date'])
|
||||
timestamp = int(time.mktime(commit_date.timetuple()))
|
||||
## Git repository with HTTP/HTTPS (Gogs, GitLab, ...)
|
||||
|
||||
# Git repository with HTTP/HTTPS (Gogs, GitLab, ...)
|
||||
elif app_url.startswith('http') and app_url.endswith('.git'):
|
||||
raw_url = '%s/raw/%s/manifest.json' % (app_url[:-4], app_rev)
|
||||
try:
|
||||
|
|
Loading…
Add table
Reference in a new issue