Exemplo n.º 1
0
 def __init__(self,
              filepath,
              fileobj=None,
              parent_path='',
              parent_sha512=None):
     AbstractFile.__init__(self, filepath, fileobj, parent_path,
                           parent_sha512)
Exemplo n.º 2
0
 def __init__(self,
              filepath,
              fileobj=None,
              parent_path='',
              parent_sha512=None):
     AbstractFile.__init__(self, filepath, fileobj, parent_path,
                           parent_sha512)
     assert self.type in handled_signers
     self.signature = decode_signer(self.filepath)
Exemplo n.º 3
0
	def __init__(self, filepath, fileobj=None, parent_path='',
				parent_sha512=None):
		arg = fileobj if fileobj else filepath
		if not is_archive(arg):
			# Oops, this was not really an archive
			raise ValueError
		AbstractFile.__init__(self, filepath, fileobj, parent_path,
							parent_sha512)
		self.archive = make_archive_obj(filepath, fileobj, True)
Exemplo n.º 4
0
	def __init__(self, filepath, fileobj=None, parent_path='',
				parent_sha512=None):
		if not fileobj:
			path = join(parent_path, filepath)
			fileobj = open(path, 'rb')
		fileobj.seek(0)
		# Skip java compiler version.
		self.magic = read_magic(fileobj)
		self.version = read_version(fileobj)
		AbstractFile.__init__(self, filepath, fileobj, parent_path,
							parent_sha512)
Exemplo n.º 5
0
 def __init__(self,
              filepath,
              fileobj=None,
              parent_path='',
              parent_sha512=None):
     if not fileobj:
         path = join(parent_path, filepath)
         fileobj = open(path, 'rb')
     fileobj.seek(0)
     # Skip java compiler version.
     self.magic = read_magic(fileobj)
     self.version = read_version(fileobj)
     AbstractFile.__init__(self, filepath, fileobj, parent_path,
                           parent_sha512)
Exemplo n.º 6
0
	def __init__(self, filepath, fileobj=None, parent_path='',
				parent_sha512=None):
		AbstractFile.__init__(self, filepath, fileobj, parent_path,
							parent_sha512)
		self.manifestinfo = {}
		self.parse()
Exemplo n.º 7
0
	def __init__(self, filepath, fileobj=None, parent_path='',
				parent_sha512=None):
		AbstractFile.__init__(self, filepath, fileobj, parent_path,
							parent_sha512)
		assert self.type in handled_signers
		self.signature = decode_signer(self.filepath)
Exemplo n.º 8
0
	def __init__(self, filepath, fileobj=None, parent_path='',
				parent_sha512=None):
		AbstractFile.__init__(self, filepath, fileobj, parent_path,
							parent_sha512)