diff options
author | Steve Slaven <bpk@hoopajoo.net> | 2009-07-24 20:42:59 (GMT) |
---|---|---|
committer | Steve Slaven <bpk@hoopajoo.net> | 2009-07-24 20:42:59 (GMT) |
commit | 1c0b8383fb01a03d8c18665f4f9837c3288bae6b (patch) | |
tree | 5af79356598ebf1ebe3f7725756a27df90232b30 | |
parent | d8cc6e355e30e10e6b0ac8f14e015325ed344ec3 (diff) | |
download | fusearchive-1c0b8383fb01a03d8c18665f4f9837c3288bae6b.zip fusearchive-1c0b8383fb01a03d8c18665f4f9837c3288bae6b.tar.gz fusearchive-1c0b8383fb01a03d8c18665f4f9837c3288bae6b.tar.bz2 |
Fixed some pylint/pychecker/pyflakes errors
-rwxr-xr-x | fusearchive.py | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/fusearchive.py b/fusearchive.py index f7fd595..4a860ee 100755 --- a/fusearchive.py +++ b/fusearchive.py @@ -8,10 +8,7 @@ # See the file COPYING. # -import os, sys, shutil, fcntl, fuse, re -import tempfile, sha, cPickle, gzip -from errno import * -from stat import * +import os, sys, fcntl, fuse, sha, cPickle, gzip, errno from fuse import Fuse import pdb @@ -104,7 +101,7 @@ def save_chunk( chunk ): dmsg( 3, "No block here, creating new block" ) savechunk = FuseArchiveStream.open( checkpath, "wb" ) savechunk.write( chunk ) - savechunk.close + savechunk.close() break dmsg( 3, "Got chunk slot: " + str( sub ) ) @@ -115,10 +112,10 @@ def load_chunk( key ): if magic_profiling: return '' - ( hash, seq ) = key + ( thash, seq ) = key dmsg( 2, "Begin load_chunk" ) - chars = list( hash ) + chars = list( thash ) dmsg( 4, chars ) # Todo: make a digest -> path function to share with deflate @@ -268,7 +265,7 @@ class FuseArchive(Fuse): def access(self, path, mode): if not os.access("./tree" + path, mode): - return -EACCES + return -errno.EACCES # This is how we could add stub extended attribute handlers... # (We can't have ones which aptly delegate requests to the underlying fs @@ -655,14 +652,14 @@ class FuseArchive(Fuse): fcntl.F_RDLCK : fcntl.LOCK_SH, fcntl.F_WRLCK : fcntl.LOCK_EX }[kw['l_type']] if cmd == fcntl.F_GETLK: - return -EOPNOTSUPP + return -errno.EOPNOTSUPP elif cmd == fcntl.F_SETLK: if op != fcntl.LOCK_UN: op |= fcntl.LOCK_NB elif cmd == fcntl.F_SETLKW: pass else: - return -EINVAL + return -errno.EINVAL fcntl.lockf(self.fd, op, kw['l_start'], kw['l_len']) |