]> granicus.if.org Git - python/commitdiff
time and socket were already imported in the module, no need to re-import
authorNeal Norwitz <nnorwitz@gmail.com>
Tue, 26 Mar 2002 16:25:01 +0000 (16:25 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Tue, 26 Mar 2002 16:25:01 +0000 (16:25 +0000)
Lib/urllib.py

index 6faba77ee0cea456e6a1f1c03a2fcdac167c645c..2ba55908778a6770a926998c2b8956e0cee54c8a 100644 (file)
@@ -496,7 +496,7 @@ class URLopener:
         # mediatype := [ type "/" subtype ] *( ";" parameter )
         # data      := *urlchar
         # parameter := attribute "=" value
-        import StringIO, mimetools, time
+        import StringIO, mimetools
         try:
             [type, data] = url.split(',', 1)
         except ValueError:
@@ -1307,7 +1307,6 @@ elif os.name == 'nt':
         try:
             import _winreg
             import re
-            import socket
         except ImportError:
             # Std modules, so should be around - but you never know!
             return 0
@@ -1365,7 +1364,6 @@ else:
 
 # Test and time quote() and unquote()
 def test1():
-    import time
     s = ''
     for i in range(256): s = s + chr(i)
     s = s*4