소스 검색

Support deep/multiple inheritance from Item

tags/v0.2.1
JustAnotherArchivist 4 년 전
부모
커밋
08d96b37c5
2개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. +6
    -0
      qwarc/__init__.py
  2. +1
    -1
      qwarc/cli.py

+ 6
- 0
qwarc/__init__.py 파일 보기

@@ -135,6 +135,12 @@ class Item:
def clear_subitems(self):
self.childItems = []

@classmethod
def get_subclasses(cls):
for subclass in cls.__subclasses__():
yield subclass
yield from subclass.get_subclasses()


class QWARC:
def __init__(self, itemClasses, warcBasePath, dbPath, command, specFile, specDependencies, logFilename, concurrency = 1, memoryLimit = 0, minFreeDisk = 0, warcSizeLimit = 0, warcDedupe = False):


+ 1
- 1
qwarc/cli.py 파일 보기

@@ -65,7 +65,7 @@ def main():
specDependencies = specMod.__dict__.get('specDependencies', qwarc.utils.SpecDependencies())

a = qwarc.QWARC(
itemClasses = qwarc.Item.__subclasses__(),
itemClasses = set(qwarc.Item.get_subclasses()),
warcBasePath = args.warc,
dbPath = args.database,
command = sys.argv,


불러오는 중...
취소
저장