mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Fix typo (fcntl, not fnctl)
This commit is contained in:
parent
7be4df6a3a
commit
dc393131b8
@ -11,10 +11,10 @@ import os
|
||||
|
||||
try:
|
||||
import fcntl
|
||||
HAS_FNCTL = True
|
||||
HAS_FCNTL = True
|
||||
except ImportError:
|
||||
# fcntl is not available on windows
|
||||
HAS_FNCTL = False
|
||||
HAS_FCNTL = False
|
||||
|
||||
# Import salt libs
|
||||
import salt.fileserver
|
||||
@ -173,7 +173,7 @@ def file_hash(load, fnd):
|
||||
if not os.path.exists(cache_dir):
|
||||
os.makedirs(cache_dir)
|
||||
# save the cache object "hash:mtime"
|
||||
if HAS_FNCTL:
|
||||
if HAS_FCNTL:
|
||||
with salt.utils.flopen(cache_path, 'w') as fp_:
|
||||
fp_.write('{0}:{1}'.format(ret['hsum'], os.path.getmtime(path)))
|
||||
fcntl.flock(fp_.fileno(), fcntl.LOCK_UN)
|
||||
|
@ -48,10 +48,10 @@ except ImportError:
|
||||
|
||||
try:
|
||||
import fcntl
|
||||
HAS_FNCTL = True
|
||||
HAS_FCNTL = True
|
||||
except ImportError:
|
||||
# fcntl is not available on windows
|
||||
HAS_FNCTL = False
|
||||
HAS_FCNTL = False
|
||||
|
||||
try:
|
||||
import win32api
|
||||
@ -964,7 +964,7 @@ def fopen(*args, **kwargs):
|
||||
survive into the new program after exec.
|
||||
'''
|
||||
fhandle = open(*args, **kwargs)
|
||||
if HAS_FNCTL:
|
||||
if HAS_FCNTL:
|
||||
# modify the file descriptor on systems with fcntl
|
||||
# unix and unix-like systems only
|
||||
try:
|
||||
@ -980,7 +980,7 @@ def fopen(*args, **kwargs):
|
||||
|
||||
def flopen(*args, **kwargs):
|
||||
fhandle = open(*args, **kwargs)
|
||||
if HAS_FNCTL:
|
||||
if HAS_FCNTL:
|
||||
# modify the file descriptor on systems with fcntl
|
||||
# unix and unix-like systems only
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user