Commit 29c816b8 by rfkelly0

fix typo "syncronise" => "synchronize"

parent 5391ab4b
......@@ -26,19 +26,19 @@ from base import *
import errors
import path
_thread_syncronize_default = True
def set_thread_syncronize_default(sync):
_thread_synchronize_default = True
def set_thread_synchronize_default(sync):
"""Sets the default thread synctonisation flag.
FS objects are made thread-safe through the use of a per-FS threading Lock
object. Since this can introduce an small overhead it can be disabled with
this function if the code is single-threaded.
:param sync: Set wether to use thread syncronization for new FS objects
:param sync: Set wether to use thread synchronization for new FS objects
"""
global _thread_syncronization_default
_thread_syncronization_default = sync
global _thread_synchronization_default
_thread_synchronization_default = sync
# Store some identifiers in the fs namespace
import os
......
......@@ -132,7 +132,7 @@ class FS(object):
"""The base class for Filesystem objects.
:param thread_synconize: If True, a lock object will be created for the object, otherwise a dummy lock will be used.
:type thread_syncronize: bool
:type thread_synchronize: bool
"""
self.closed = False
if thread_synchronize:
......
......@@ -12,7 +12,7 @@ File objects returned by MemoryFS.objects use StringIO objects for storage.
import datetime
from fs.path import iteratepath
from fs.base import *
from fs import _thread_syncronize_default
from fs import _thread_synchronize_default
try:
from cStringIO import StringIO
......@@ -180,7 +180,7 @@ class MemoryFS(FS):
return self.dir_entry_factory(*args, **kwargs)
def __init__(self, file_factory=None):
super(MemoryFS, self).__init__(thread_synchronize=_thread_syncronize_default)
super(MemoryFS, self).__init__(thread_synchronize=_thread_synchronize_default)
self.dir_entry_factory = DirEntry
self.file_factory = file_factory or MemoryFile
......
......@@ -8,7 +8,7 @@ Contains MountFS class which is a virtual Filesystem which can have other Filesy
from fs.base import *
from fs.objecttree import ObjectTree
from fs import _thread_syncronize_default
from fs import _thread_synchronize_default
class DirMount(object):
......@@ -34,7 +34,7 @@ class MountFS(FS):
DirMount = DirMount
FileMount = FileMount
def __init__(self, thread_synchronize=_thread_syncronize_default):
def __init__(self, thread_synchronize=_thread_synchronize_default):
FS.__init__(self, thread_synchronize=thread_synchronize)
self.mount_tree = ObjectTree()
......
......@@ -26,7 +26,7 @@ it will look for it in *templates/index.html*.
from fs.base import FS, FSError, synchronize
from fs.path import *
from fs import _thread_syncronize_default
from fs import _thread_synchronize_default
class MultiFS(FS):
......@@ -39,7 +39,7 @@ class MultiFS(FS):
"""
def __init__(self):
FS.__init__(self, thread_synchronize=_thread_syncronize_default)
FS.__init__(self, thread_synchronize=_thread_synchronize_default)
self.fs_sequence = []
self.fs_lookup = {}
......
......@@ -19,7 +19,7 @@ import errno
from fs.base import *
from fs.path import *
from fs import _thread_syncronize_default
from fs import _thread_synchronize_default
try:
import xattr
......@@ -41,14 +41,14 @@ class OSFS(FS):
methods in the os and os.path modules.
"""
def __init__(self, root_path, dir_mode=0700, thread_synchronize=_thread_syncronize_default, encoding=None):
def __init__(self, root_path, dir_mode=0700, thread_synchronize=_thread_synchronize_default, encoding=None):
"""
Creates an FS object that represents the OS Filesystem under a given root path
:param root_path: The root OS path
:param dir_mode: srt
:param thread_syncronize: If True, this object will be thread-safe by use of a threading.Lock object
:param thread_synchronize: If True, this object will be thread-safe by use of a threading.Lock object
:param encoding: The encoding method for path strings
"""
......
......@@ -12,14 +12,14 @@ import tempfile
from fs.osfs import OSFS
from fs.errors import *
from fs import _thread_syncronize_default
from fs import _thread_synchronize_default
class TempFS(OSFS):
"""Create a Filesystem in a tempory directory (with tempfile.mkdtemp),
and removes it when the TempFS object is cleaned up."""
def __init__(self, identifier=None, temp_dir=None, dir_mode=0700, thread_synchronize=_thread_syncronize_default):
def __init__(self, identifier=None, temp_dir=None, dir_mode=0700, thread_synchronize=_thread_synchronize_default):
"""Creates a temporary Filesystem
identifier -- A string that is included in the name of the temporary directory,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment