mirror of https://github.com/tLDP/python-tldp
pyflakes/pep8 adjustments
This commit is contained in:
parent
dec201f50c
commit
53c476cebc
|
@ -7,4 +7,4 @@ import tldp.outputs
|
||||||
import tldp.sources
|
import tldp.sources
|
||||||
import tldp.inventory
|
import tldp.inventory
|
||||||
|
|
||||||
VERSION="0.7.11"
|
VERSION = "0.7.11"
|
||||||
|
|
|
@ -31,7 +31,7 @@ signal.signal(signal.SIGPIPE, signal.SIG_DFL)
|
||||||
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
||||||
|
|
||||||
logformat = '%(levelname)-9s %(name)s %(filename)s#%(lineno)s ' \
|
logformat = '%(levelname)-9s %(name)s %(filename)s#%(lineno)s ' \
|
||||||
+ '%(funcName)s %(message)s'
|
+ '%(funcName)s %(message)s'
|
||||||
logging.basicConfig(stream=sys.stderr, format=logformat, level=logging.ERROR)
|
logging.basicConfig(stream=sys.stderr, format=logformat, level=logging.ERROR)
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -71,8 +71,7 @@ class Inventory(object):
|
||||||
len(self.orphan),
|
len(self.orphan),
|
||||||
len(self.new),
|
len(self.new),
|
||||||
len(self.stale),
|
len(self.stale),
|
||||||
len(self.broken),
|
len(self.broken),)
|
||||||
)
|
|
||||||
|
|
||||||
def __init__(self, pubdir, sourcedirs):
|
def __init__(self, pubdir, sourcedirs):
|
||||||
'''construct an Inventory
|
'''construct an Inventory
|
||||||
|
|
|
@ -284,6 +284,7 @@ def md5files(name, relative=None):
|
||||||
'''get all of the MD5s for files from here downtree'''
|
'''get all of the MD5s for files from here downtree'''
|
||||||
return fileinfo(name, relative=relative, func=md5file)
|
return fileinfo(name, relative=relative, func=md5file)
|
||||||
|
|
||||||
|
|
||||||
def statfiles(name, relative=None):
|
def statfiles(name, relative=None):
|
||||||
'''
|
'''
|
||||||
>>> statfiles('./docs/x509').keys()
|
>>> statfiles('./docs/x509').keys()
|
||||||
|
@ -295,6 +296,7 @@ def statfiles(name, relative=None):
|
||||||
'''
|
'''
|
||||||
return fileinfo(name, relative=relative, func=statfile)
|
return fileinfo(name, relative=relative, func=statfile)
|
||||||
|
|
||||||
|
|
||||||
def fileinfo(name, relative=None, func=statfile):
|
def fileinfo(name, relative=None, func=statfile):
|
||||||
'''return a dict() with keys being filenames and posix.stat_result values
|
'''return a dict() with keys being filenames and posix.stat_result values
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue