This website works better with JavaScript.
Home
Explore
Help
Sign In
JustAnotherArchivist
/
qwarc
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
13
Wiki
Activity
Browse Source
Support deep/multiple inheritance from Item
tags/v0.2.1
JustAnotherArchivist
4 years ago
parent
9d8de13775
commit
08d96b37c5
2 changed files
with
7 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+6
-0
qwarc/__init__.py
+1
-1
qwarc/cli.py
+ 6
- 0
qwarc/__init__.py
View File
@@ -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
View File
@@ -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,
Write
Preview
Loading…
Cancel
Save