Download:
child 38:ec32ce289f91
parent 36:9a474aabfe41
37:b4e3fa814a17 draft
Anton Shestakov <av6@dwimlabs.net>, Sun, 16 Dec 2018 11:15:33 +0800
plugin: fallback values for phab status and desc don't need to be so verbose

1 файлов изменено, 2 вставок(+), 2 удалений(-) [+]
plugin.py file | annotate | diff | comparison | revisions
--- a/plugin.py Fri Nov 30 20:49:45 2018 +0800
+++ b/plugin.py Sun Dec 16 11:15:33 2018 +0800
@@ -165,8 +165,8 @@
url = '{}/D{}'.format(baseurl.rstrip('/'), phabrev)
page = utils.web.getUrl(url).decode('utf-8')
- status = 'Status N/A'
- desc = 'Description N/A'
+ status = '?'
+ desc = '?'
match = re.search(r'<div class="phui-header-subheader">.*?</span>(?P<status>[^<]+?)</span>', page)
if match:
status = utils.web.htmlToText(match.group('status'))