Browse Source

Cleanup unused code

test_fixup
Vadim Lebedev 2 years ago
parent
commit
e9c1df8f77
1 changed files with 1 additions and 13 deletions
  1. +1
    -13
      libarchive/__init__.py

+ 1
- 13
libarchive/__init__.py View File

@@ -28,9 +28,6 @@ import stat
import sys import sys
import time import time
import warnings import warnings

# from ctypes import cdll, c_char_p

from libarchive import _libarchive from libarchive import _libarchive
from io import StringIO from io import StringIO


@@ -323,11 +320,6 @@ class Entry(object):


self.symlink = "" self.symlink = ""


# if self.issym() and symlink:
# self.symlink = symlink
# else:
# self.symlink = None

@property @property
def header_position(self): def header_position(self):
return self.hpos return self.hpos
@@ -387,9 +379,7 @@ class Entry(object):
entry.mtime = getattr(f, 'mtime', time.time()) entry.mtime = getattr(f, 'mtime', time.time())
entry.mode = stat.S_IFREG entry.mode = stat.S_IFREG


if stat.S_ISLNK(entry.mode):
print("yo")

return entry return entry


def to_archive(self, archive): def to_archive(self, archive):
@@ -410,8 +400,6 @@ class Entry(object):


call_and_check(_libarchive.archive_write_header, archive._a, archive._a, e) call_and_check(_libarchive.archive_write_header, archive._a, archive._a, e)


# todo
# self.hpos = archive.header_position
finally: finally:
_libarchive.archive_entry_free(e) _libarchive.archive_entry_free(e)




Loading…
Cancel
Save