Victor Stinner avatar Victor Stinner committed 137b8e2

remove unused imports

Comments (0)

Files changed (13)

hachoir-parser/hachoir_parser/archive/zip.py

     TimeDateMSDOS32, SubFile,
     UInt8, UInt16, UInt32, UInt64,
     String, PascalString16,
-    RawBytes, SubFile)
+    RawBytes)
 from hachoir_core.text_handler import textHandler, filesizeHandler, hexadecimal
 from hachoir_core.error import HACHOIR_ERRORS
 from hachoir_core.tools import makeUnicode

hachoir-parser/hachoir_parser/audio/mod.py

 from hachoir_core.field import (FieldSet,
     Bits, UInt16, UInt8,
     RawBytes, String, GenericVector)
-from hachoir_core.endian import LITTLE_ENDIAN, BIG_ENDIAN
+from hachoir_core.endian import BIG_ENDIAN
 from hachoir_core.text_handler import textHandler
-from hachoir_parser.common.tracker import NOTE_NAME
 
 # Old NoiseTracker 15-samples modules can have anything here.
 MODULE_TYPE = {

hachoir-parser/hachoir_parser/audio/mpeg_audio.py

         try:
             if self.stream.readBytes(size, 3) == "TAG":
                 size += ID3v1.static_size
-        except InputStreamError, err:
+        except InputStreamError:
             pass
         return size
 

hachoir-parser/hachoir_parser/container/action_script.py

 Creation date: 26 April 2008
 """
 
-from hachoir_parser import Parser
 from hachoir_core.field import (FieldSet, ParserError,
-    Bit, Bits, UInt8, UInt32, Int16, UInt16, Float32, CString, Enum,
-    Bytes, RawBytes, NullBits, String, SubFile, Field)
+    Bit, Bits, UInt8, UInt32, Int16, UInt16, Float32, CString,
+    RawBytes)
+#from hachoir_core.field import Field
 from hachoir_core.field.float import FloatExponent
 from struct import unpack
 

hachoir-parser/hachoir_parser/file_system/mbr.py

 from hachoir_core.field import (FieldSet,
     Enum, Bits, UInt8, UInt16, UInt32,
     RawBytes)
-from hachoir_core.field.integer import Bits
 from hachoir_core.endian import LITTLE_ENDIAN
 from hachoir_core.tools import humanFilesize
 from hachoir_core.text_handler import textHandler, hexadecimal

hachoir-parser/hachoir_parser/image/wmf.py

                 return "Invalid record type"
             if emf["reserved"].value != "\0\0":
                 return "Invalid reserved"
-            FUNC_DICT = EMF_META_NAME
         else:
             # Check AMF header
             if self.isAPM():
                 return "Invalid header size"
             if self["nb_params"].value != 0:
                 return "Invalid number of parameters"
-            FUNC_DICT = META_NAME
 
         # Check first functions
         for index in xrange(5):

hachoir-parser/hachoir_parser/misc/gnome_keyring.py

 from hachoir_core.field import (FieldSet,
     Bit, NullBits, NullBytes,
     UInt8, UInt32, String, RawBytes, Enum,
-    PascalString32, TimestampUnix64, CompressedField,
+    TimestampUnix64, CompressedField,
     SubFile)
 from hachoir_core.endian import BIG_ENDIAN
-from sys import hexversion
 
 try:
     import hashlib

hachoir-parser/hachoir_parser/misc/msoffice_summary.py

     Bit, Bits, NullBits,
     UInt8, UInt16, UInt32, TimestampWin64, TimedeltaWin64, Enum,
     Bytes, RawBytes, NullBytes, String,
-    Int8, Int16, Int32, Float32, Float64, PascalString32)
+    Int8, Int32, Float32, Float64, PascalString32)
 from hachoir_core.text_handler import textHandler, hexadecimal, filesizeHandler
 from hachoir_core.tools import createDict
 from hachoir_core.endian import LITTLE_ENDIAN, BIG_ENDIAN

hachoir-parser/hachoir_parser/misc/ole2.py

 from hachoir_parser import HachoirParser
 from hachoir_core.field import (
     FieldSet, ParserError, SeekableFieldSet, RootSeekableFieldSet,
-    UInt8, UInt16, Int32, UInt32, UInt64, TimestampWin64, Enum,
+    UInt8, UInt16, UInt32, UInt64, TimestampWin64, Enum,
     Bytes, RawBytes, NullBytes, String)
-from hachoir_core.text_handler import textHandler, hexadecimal, filesizeHandler
-from hachoir_core.endian import LITTLE_ENDIAN, BIG_ENDIAN
+from hachoir_core.text_handler import filesizeHandler
+from hachoir_core.endian import LITTLE_ENDIAN
 from hachoir_parser.common.win32 import GUID
 from hachoir_parser.misc.msoffice import CustomFragment, OfficeRootEntry, PROPERTY_NAME
 from hachoir_parser.misc.word_doc import WordDocumentParser
             index = block // items_per_fat
             try:
                 block = fat[index]["index[%u]" % block].value
-            except LookupError, err:
+            except LookupError:
                 break
 
     def readBFAT(self):

hachoir-parser/hachoir_parser/misc/word_doc.py

 from hachoir_core.field import (FieldSet,
     Bit, Bits,
     UInt8, Int16, UInt16, UInt32, Int32,
-    NullBytes, Bytes, RawBytes, PascalString16,
-    DateTimeMSDOS32, TimeDateMSDOS32)
+    NullBytes, RawBytes, PascalString16,
+    DateTimeMSDOS32)
 from hachoir_core.endian import LITTLE_ENDIAN
 
-#TIMESTAMP = TimeDateMSDOS32
 TIMESTAMP = DateTimeMSDOS32
 
 class BaseWordDocument:

hachoir-parser/hachoir_parser/program/prc.py

 """
 
 from hachoir_parser import Parser
-from hachoir_core.field import (FieldSet, ParserError,
+from hachoir_core.field import (FieldSet,
     UInt16, UInt32, TimestampMac32,
     String, RawBytes)
-from hachoir_core.text_handler import textHandler, hexadecimal
-from hachoir_core.endian import LITTLE_ENDIAN, BIG_ENDIAN
+from hachoir_core.endian import BIG_ENDIAN
 
 class PRCHeader(FieldSet):
     static_size = 78*8
         yield PRCHeader(self, "header", "Header")
         lens = []
         firstOne = True
+        poff = 0
         for index in xrange(self["header/num_records"].value):
             r = ResourceHeader(self, "res_header[]")
             if firstOne:

hachoir-parser/hachoir_parser/video/asf.py

     PaddingBytes, NullBytes, RawBytes)
 from hachoir_core.endian import LITTLE_ENDIAN
 from hachoir_core.text_handler import (
-    textHandler, displayHandler, filesizeHandler)
+    displayHandler, filesizeHandler)
 from hachoir_core.tools import humanBitRate
 from itertools import izip
 from hachoir_parser.video.fourcc import audio_codec_name, video_fourcc_name

hachoir-parser/tests/download_testcase.py

                 return False
             if not checkFileMD5(fullname, md5sum):
                 return False
-        except OSError, err:
+        except OSError:
             # Error: file doesn't exist
             if not download(url_prefix+filename, filesize, md5sum, fullname):
                 return False
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.