Show More
@@ -52,6 +52,7 import sys | |||
|
52 | 52 | # Enable tracing. Run 'python -m win32traceutil' to debug |
|
53 | 53 | if getattr(sys, 'isapidllhandle', None) is not None: |
|
54 | 54 | import win32traceutil |
|
55 | win32traceutil.SetupForPrint # silence unused import warning | |
|
55 | 56 | |
|
56 | 57 | # To serve pages in local charset instead of UTF-8, remove the two lines below |
|
57 | 58 | import os |
@@ -90,6 +91,6 def __ExtensionFactory__(): | |||
|
90 | 91 | return isapi_wsgi.ISAPISimpleHandler(handler) |
|
91 | 92 | |
|
92 | 93 | if __name__=='__main__': |
|
93 |
from isapi.install import |
|
|
94 | from isapi.install import ISAPIParameters, HandleCommandLine | |
|
94 | 95 | params = ISAPIParameters() |
|
95 | 96 | HandleCommandLine(params) |
@@ -33,12 +33,14 try: | |||
|
33 | 33 | except ImportError: |
|
34 | 34 | try: |
|
35 | 35 | import sha |
|
36 | sha.sha # silence unused import warning | |
|
36 | 37 | except ImportError: |
|
37 | 38 | raise SystemExit( |
|
38 | 39 | "Couldn't import standard hashlib (incomplete Python install).") |
|
39 | 40 | |
|
40 | 41 | try: |
|
41 | 42 | import zlib |
|
43 | zlib.compressobj # silence unused import warning | |
|
42 | 44 | except ImportError: |
|
43 | 45 | raise SystemExit( |
|
44 | 46 | "Couldn't import standard zlib (incomplete Python install).") |
@@ -56,6 +58,7 if isironpython: | |||
|
56 | 58 | else: |
|
57 | 59 | try: |
|
58 | 60 | import bz2 |
|
61 | bz2.BZ2Compressor # silence unused import warning | |
|
59 | 62 | except ImportError: |
|
60 | 63 | raise SystemExit( |
|
61 | 64 | "Couldn't import standard bz2 (incomplete Python install).") |
@@ -129,6 +132,7 def hasfunction(cc, funcname): | |||
|
129 | 132 | # py2exe needs to be installed to work |
|
130 | 133 | try: |
|
131 | 134 | import py2exe |
|
135 | py2exe.Distribution # silence unused import warning | |
|
132 | 136 | py2exeloaded = True |
|
133 | 137 | # import py2exe's patched Distribution class |
|
134 | 138 | from distutils.core import Distribution |
@@ -148,6 +148,7 def has_cacheable_fs(): | |||
|
148 | 148 | def has_lsprof(): |
|
149 | 149 | try: |
|
150 | 150 | import _lsprof |
|
151 | _lsprof.Profiler # silence unused import warning | |
|
151 | 152 | return True |
|
152 | 153 | except ImportError: |
|
153 | 154 | return False |
@@ -164,6 +165,7 def has_git(): | |||
|
164 | 165 | def has_docutils(): |
|
165 | 166 | try: |
|
166 | 167 | from docutils.core import publish_cmdline |
|
168 | publish_cmdline # silence unused import | |
|
167 | 169 | return True |
|
168 | 170 | except ImportError: |
|
169 | 171 | return False |
@@ -270,6 +272,7 def has_pyflakes(): | |||
|
270 | 272 | def has_pygments(): |
|
271 | 273 | try: |
|
272 | 274 | import pygments |
|
275 | pygments.highlight # silence unused import warning | |
|
273 | 276 | return True |
|
274 | 277 | except ImportError: |
|
275 | 278 | return False |
@@ -288,6 +291,7 def has_outer_repo(): | |||
|
288 | 291 | def has_ssl(): |
|
289 | 292 | try: |
|
290 | 293 | import ssl |
|
294 | ssl.wrap_socket # silence unused import warning | |
|
291 | 295 | import OpenSSL |
|
292 | 296 | OpenSSL.SSL.Context |
|
293 | 297 | return True |
@@ -7,16 +7,6 run pyflakes on all tracked files ending | |||
|
7 | 7 | |
|
8 | 8 | $ hg locate 'set:**.py or grep("^!#.*python")' 2>/dev/null \ |
|
9 | 9 | > | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py" |
|
10 | contrib/win32/hgwebdir_wsgi.py:*: 'win32traceutil' imported but unused (glob) | |
|
11 | setup.py:*: 'sha' imported but unused (glob) | |
|
12 | setup.py:*: 'zlib' imported but unused (glob) | |
|
13 | setup.py:*: 'bz2' imported but unused (glob) | |
|
14 | setup.py:*: 'py2exe' imported but unused (glob) | |
|
15 | tests/hghave.py:*: '_lsprof' imported but unused (glob) | |
|
16 | tests/hghave.py:*: 'publish_cmdline' imported but unused (glob) | |
|
17 | tests/hghave.py:*: 'pygments' imported but unused (glob) | |
|
18 | tests/hghave.py:*: 'ssl' imported but unused (glob) | |
|
19 | contrib/win32/hgwebdir_wsgi.py:93: 'from isapi.install import *' used; unable to detect undefined names (glob) | |
|
20 | 10 | tests/filterpyflakes.py:58: undefined name 'undefinedname' |
|
21 | 11 | |
|
22 | 12 |
General Comments 0
You need to be logged in to leave comments.
Login now