Skip to content

Commit

Permalink
Moved FUSE binding configuration to DedupFS constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
xolox committed May 19, 2010
1 parent 69c39d6 commit bdf42ce
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions dedupfs.py
Expand Up @@ -53,12 +53,7 @@ def main(): # {{{1
mount points. Execute "dedupfs -h" for a list of valid command-line options.
"""

# Set the Python FUSE API version that this script was written against.
fuse.fuse_python_api = (0, 2)

dfs = DedupFS()
dfs.flags = 0
dfs.multithreaded = 0

# A short usage message with the command-line options defined by dedupfs
# itself (see the __init__() method of the DedupFS class) is automatically
Expand Down Expand Up @@ -94,9 +89,16 @@ def __init__(self, *args, **kw): # {{{2

try:

# Set the Python FUSE API version.
fuse.fuse_python_api = (0, 2)

# Initialize the FUSE binding's internal state.
fuse.Fuse.__init__(self, *args, **kw)

# Set some options required by the Python FUSE binding.
self.flags = 0
self.multithreaded = 0

# Initialize instance attributes.
self.block_size = 1024 * 128
self.buffers = {}
Expand Down

0 comments on commit bdf42ce

Please sign in to comment.