summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2015-04-18 17:32:13 +0300
committerLars Wirzenius <liw@liw.fi>2015-04-18 17:32:13 +0300
commit0541ad3bc1602fbd13a9d674631dad89ee5316ac (patch)
tree5a52098eb4fb068cfff5d874c7975969425744f1
parent9809a4b3be65cbb9871b4d06725e2e3f0a184604 (diff)
downloadcachedir-0541ad3bc1602fbd13a9d674631dad89ee5316ac.tar.gz
Run pep8 in check; fix problems
-rwxr-xr-xcachedir18
-rw-r--r--setup.py3
2 files changed, 11 insertions, 10 deletions
diff --git a/cachedir b/cachedir
index 85ede6f..5658e98 100755
--- a/cachedir
+++ b/cachedir
@@ -1,16 +1,16 @@
#!/usr/bin/python
# Copyright 2012, 2013 Lars Wirzenius
-#
+#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
@@ -33,11 +33,11 @@ class Cachedir(cliapp.Application):
def cmd_tag(self, args):
'''Add cache tag to directories.'''
-
+
for dirname in args:
with open(self._join(dirname), 'w') as f:
f.write(self._tag)
-
+
def cmd_untag(self, args):
'''Remove cache tag from directories.'''
@@ -46,10 +46,10 @@ class Cachedir(cliapp.Application):
def cmd_iscache(self, args):
'''Are all named directories tagged?
-
+
There is no output, but exit code is 0 if all named directories
are tagged as cache directories.
-
+
'''
errors = False
@@ -62,11 +62,11 @@ class Cachedir(cliapp.Application):
def cmd_find(self, args):
'''Find cache directories under the given directories.'''
-
+
for startdir in args:
for dirname, subdirs, filenames in os.walk(startdir):
if os.path.exists(self._join(dirname)):
self.output.write('%s\n' % dirname)
-
+
Cachedir(version=__version__).run()
diff --git a/setup.py b/setup.py
index f675878..388df5e 100644
--- a/setup.py
+++ b/setup.py
@@ -60,7 +60,8 @@ class Check(Command):
pass
def run(self):
- cliapp.runcmd(['cmdtest', 'tests'])
+ cliapp.runcmd(['cmdtest', 'tests'], stdout=None, stderr=None)
+ cliapp.runcmd(['pep8', 'cachedir'], stdout=None, stderr=None)
setup(name='cachedir',