1. Victor Stinner
  2. hachoir


Victor Stinner  committed 137b8e2

remove unused imports

  • Participants
  • Parent commits 0c3fdf3
  • Branches default

Comments (0)

Files changed (13)

File hachoir-parser/hachoir_parser/archive/zip.py

View file
     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

File hachoir-parser/hachoir_parser/audio/mod.py

View file
 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.

File hachoir-parser/hachoir_parser/audio/mpeg_audio.py

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

File hachoir-parser/hachoir_parser/container/action_script.py

View file
 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

File hachoir-parser/hachoir_parser/file_system/mbr.py

View file
 from hachoir_core.field import (FieldSet,
     Enum, Bits, UInt8, UInt16, UInt32,
-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

File hachoir-parser/hachoir_parser/image/wmf.py

View file
                 return "Invalid record type"
             if emf["reserved"].value != "\0\0":
                 return "Invalid reserved"
-            FUNC_DICT = EMF_META_NAME
             # 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):

File hachoir-parser/hachoir_parser/misc/gnome_keyring.py

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

File hachoir-parser/hachoir_parser/misc/msoffice_summary.py

View file
     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

File hachoir-parser/hachoir_parser/misc/ole2.py

View file
 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
                 block = fat[index]["index[%u]" % block].value
-            except LookupError, err:
+            except LookupError:
     def readBFAT(self):

File hachoir-parser/hachoir_parser/misc/word_doc.py

View file
 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
 class BaseWordDocument:

File hachoir-parser/hachoir_parser/program/prc.py

View file
 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:

File hachoir-parser/hachoir_parser/video/asf.py

View file
     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

File hachoir-parser/tests/download_testcase.py

View file
                 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