mirror of https://github.com/tLDP/python-tldp
switch to using statfiles
This commit is contained in:
parent
515595cac9
commit
9301a54ab2
|
@ -6,7 +6,7 @@ import os
|
|||
import errno
|
||||
|
||||
import collections
|
||||
from .utils import logger, getfileset
|
||||
from .utils import logger, statfiles
|
||||
|
||||
|
||||
class OutputNamingConvention(object):
|
||||
|
@ -54,7 +54,7 @@ class OutputDirectory(OutputNamingConvention):
|
|||
if not os.path.isdir(self.dirname):
|
||||
logger.info("%s creating output directory %s.", self.stem, dirname)
|
||||
os.mkdir(dirname)
|
||||
self.fileset = getfileset(self.dirname)
|
||||
self.statinfo = statfiles(self.dirname, relative=self.dirname)
|
||||
self.status = 'output'
|
||||
super(OutputDirectory, self).__init__(self.stem, self.dirname)
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import os
|
|||
import errno
|
||||
import collections
|
||||
|
||||
from .utils import logger, getfileset
|
||||
from .utils import logger, statfiles
|
||||
from .typeguesser import guess, knownextensions
|
||||
|
||||
|
||||
|
@ -90,9 +90,9 @@ class SourceDocument(object):
|
|||
self.resources = False # -- assume no ./images/, ./resources/
|
||||
parentbase = os.path.basename(self.dirname)
|
||||
if parentbase == self.stem:
|
||||
self.fileset = getfileset(self.dirname)
|
||||
self.statinfo = statfiles(self.dirname, relative=self.dirname)
|
||||
else:
|
||||
self.fileset = set([self.basename])
|
||||
self.statinfo = statfiles(self.filename, relative=self.dirname)
|
||||
|
||||
def _doctype(self):
|
||||
return guess(self.filename)
|
||||
|
|
Loading…
Reference in New Issue