Download:
child 21:0c0cb021d530
parent 19:617cf0ab60ed
20:5d830ac627fc
Anton Shestakov <av6@dwimlabs.net>, Wed, 15 Jun 2016 21:35:22 +0800
incoming: use absolute imports

1 файлов изменено, 9 вставок(+), 0 удалений(-) [+]
incoming.py file | annotate | diff | comparison | revisions
--- a/incoming.py Wed Jun 15 20:53:22 2016 +0800
+++ b/incoming.py Wed Jun 15 21:35:22 2016 +0800
@@ -1,4 +1,6 @@
#!/usr/bin/env python
+from __future__ import absolute_import
+
import fileinput
import logging
import os
@@ -42,6 +44,11 @@
cls = None
if state == 'checks':
+ """
+ m = re.match(r'^(.+):\d+:\d+: ')
+ if m is not None:
+ filename = m.group(1)
+ """
# pep8-specific E9xx
# https://pep8.readthedocs.io/en/latest/intro.html#error-codes
if re.match(r'^.+:\d+:\d+: E9\d{2}', line) is not None:
@@ -113,6 +120,8 @@
parsed = urlparse(url)
domain = parsed.hostname
+ if domain is None:
+ domain = 'self'
parts = [part for part in parsed.path.split('/') if part]
if len(parts) > 1:
user, name = parts[-2:]