diff --git a/tldp/driver.py b/tldp/driver.py index 553a6d2..59dabdf 100644 --- a/tldp/driver.py +++ b/tldp/driver.py @@ -16,7 +16,8 @@ from tldp.sources import SourceDocument, arg_issourcedoc from tldp.outputs import OutputDirectory from tldp.inventory import Inventory, status_classes, status_types, stypes from tldp.config import collectconfiguration -from tldp.utils import arg_isloglevel, arg_isdirectory, swapdirs +from tldp.utils import arg_isloglevel, arg_isdirectory +from tldp.utils import swapdirs, sameFilesystem from tldp.doctypes.common import preamble, postamble logformat = '%(levelname)-9s %(name)s %(filename)s#%(lineno)s ' \ @@ -39,7 +40,6 @@ ERR_UNKNOWNARGS = "Unknown arguments received: " ERR_EXTRAARGS = "Extra arguments received: " - def show_doctypes(config, *args, **kwargs): if args: return ERR_EXTRAARGS + ' '.join(args) @@ -368,10 +368,6 @@ def extractExplicitDocumentArgs(config, args): return docs, remainder -def sameFilesystem(d0, d1): - return os.stat(d0).st_dev == os.stat(d1).st_dev - - def collectWorkset(config, args): # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # -- argument handling logic; try to avoid creating an inventory unless it diff --git a/tldp/utils.py b/tldp/utils.py index adec896..4e8a295 100644 --- a/tldp/utils.py +++ b/tldp/utils.py @@ -75,6 +75,10 @@ def arg_isexecutable(f): return None +def sameFilesystem(d0, d1): + return os.stat(d0).st_dev == os.stat(d1).st_dev + + def stem_and_ext(name): '''return (stem, ext) for any relative or absolute filename''' return os.path.splitext(os.path.basename(os.path.normpath(name)))