File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ .tox /
2+ * .egg-info /
Original file line number Diff line number Diff line change 1+ language : python
2+ python : 2.7
3+ env :
4+ - TOXENV=py34
5+ - TOXENV=pep8
6+
7+ install :
8+ - pip install tox
9+
10+ script :
11+ - tox
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ def fail(self, desc):
3434 self .icon = "bad"
3535 self .description = desc
3636
37+
3738def check_one_site (site ):
3839 domain = site ["domain" ]
3940 log .info ("Checking {}" .format (domain ))
@@ -148,6 +149,7 @@ def check_one_site(site):
148149
149150 site ["status" ] = "mediocre" if mediocre else "good"
150151
152+
151153def worker (q ):
152154 while True :
153155 try :
@@ -159,6 +161,7 @@ def worker(q):
159161 except Exception :
160162 log .exception ("{} failed!" .format (site ["domain" ]))
161163
164+
162165def check_sites ():
163166 # Read list of sites.
164167 with open ("sites.json" , encoding = "utf-8" ) as fp :
@@ -192,11 +195,13 @@ def check_sites():
192195
193196 return data
194197
198+
195199def encode_check (o ):
196200 if not isinstance (o , Check ):
197201 raise TypeError
198202 return o .__dict__
199203
204+
200205def main ():
201206 if "--cached" in sys .argv :
202207 with open ("cache.json" , "r" , encoding = "utf-8" ) as fp :
Original file line number Diff line number Diff line change 1+ from setuptools import setup
2+
3+ setup ()
Original file line number Diff line number Diff line change 1+ [tox]
2+ envlist = py34,pep8
3+
4+ [testenv]
5+ deps =
6+ -rrequirements.txt
7+ commands = python check_https.py
8+
9+ [testenv:pep8]
10+ basepython = python3.4
11+ deps = flake8
12+ commands = flake8 check_https.py
13+
14+ [flake8]
15+ exclude = .tox/
16+ # E501: Line too long
17+ ignore = E501
You can’t perform that action at this time.
0 commit comments