提交 8eced9fe authored 作者: David Warde-Farley's avatar David Warde-Farley

PEP8.

上级 01378de9
...@@ -19,15 +19,16 @@ def print_help(exit_status): ...@@ -19,15 +19,16 @@ def print_help(exit_status):
print('Type "theano-cache clear" to erase the cache') print('Type "theano-cache clear" to erase the cache')
print('Type "theano-cache list" to print the cache content') print('Type "theano-cache list" to print the cache content')
print('Type "theano-cache unlock" to unlock the cache directory') print('Type "theano-cache unlock" to unlock the cache directory')
print('Type "theano-cache cleanup" to delete keys in the old format/code version') print('Type "theano-cache cleanup" to delete keys in the old '
'format/code version')
print('Type "theano-cache purge" to force deletion of the cache directory') print('Type "theano-cache purge" to force deletion of the cache directory')
print('Type "theano-cache basecompiledir" ' print('Type "theano-cache basecompiledir" '
'to print the parent of the cache directory') 'to print the parent of the cache directory')
print('Type "theano-cache basecompiledir list" ' print('Type "theano-cache basecompiledir list" '
'to print the content of the base compile dir') 'to print the content of the base compile dir')
print('Type "theano-cache basecompiledir purge" ' print('Type "theano-cache basecompiledir purge" '
'to remove everything in the base compile dir, ' 'to remove everything in the base compile dir, '
'that is, erase ALL cache directories') 'that is, erase ALL cache directories')
sys.exit(exit_status) sys.exit(exit_status)
if len(sys.argv) == 1: if len(sys.argv) == 1:
...@@ -46,14 +47,14 @@ elif len(sys.argv) == 2: ...@@ -46,14 +47,14 @@ elif len(sys.argv) == 2:
# user knows he should manually delete them, or call # user knows he should manually delete them, or call
# theano-cache purge, # to properly clear the cache. # theano-cache purge, # to properly clear the cache.
items = [item for item in sorted(os.listdir(cache.dirname)) items = [item for item in sorted(os.listdir(cache.dirname))
if item.startswith('tmp')] if item.startswith('tmp')]
if items: if items:
_logger.warning( _logger.warning(
'There remain elements in the cache dir that you may ' 'There remain elements in the cache dir that you may '
'need to erase manually. The cache dir is:\n %s\n' 'need to erase manually. The cache dir is:\n %s\n'
'You can also call "theano-cache purge" to ' 'You can also call "theano-cache purge" to '
'remove everything from that directory.' % 'remove everything from that directory.' %
config.compiledir) config.compiledir)
_logger.debug('Remaining elements (%s): %s' % _logger.debug('Remaining elements (%s): %s' %
(len(items), ', '.join(items))) (len(items), ', '.join(items)))
elif sys.argv[1] == 'list': elif sys.argv[1] == 'list':
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论