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:
|
try:
|
||||||
import fcntl
|
import fcntl
|
||||||
HAS_FNCTL = True
|
HAS_FCNTL = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
# fcntl is not available on windows
|
# fcntl is not available on windows
|
||||||
HAS_FNCTL = False
|
HAS_FCNTL = False
|
||||||
|
|
||||||
# Import salt libs
|
# Import salt libs
|
||||||
import salt.fileserver
|
import salt.fileserver
|
||||||
@ -173,7 +173,7 @@ def file_hash(load, fnd):
|
|||||||
if not os.path.exists(cache_dir):
|
if not os.path.exists(cache_dir):
|
||||||
os.makedirs(cache_dir)
|
os.makedirs(cache_dir)
|
||||||
# save the cache object "hash:mtime"
|
# save the cache object "hash:mtime"
|
||||||
if HAS_FNCTL:
|
if HAS_FCNTL:
|
||||||
with salt.utils.flopen(cache_path, 'w') as fp_:
|
with salt.utils.flopen(cache_path, 'w') as fp_:
|
||||||
fp_.write('{0}:{1}'.format(ret['hsum'], os.path.getmtime(path)))
|
fp_.write('{0}:{1}'.format(ret['hsum'], os.path.getmtime(path)))
|
||||||
fcntl.flock(fp_.fileno(), fcntl.LOCK_UN)
|
fcntl.flock(fp_.fileno(), fcntl.LOCK_UN)
|
||||||
|
@ -48,10 +48,10 @@ except ImportError:
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
import fcntl
|
import fcntl
|
||||||
HAS_FNCTL = True
|
HAS_FCNTL = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
# fcntl is not available on windows
|
# fcntl is not available on windows
|
||||||
HAS_FNCTL = False
|
HAS_FCNTL = False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import win32api
|
import win32api
|
||||||
@ -964,7 +964,7 @@ def fopen(*args, **kwargs):
|
|||||||
survive into the new program after exec.
|
survive into the new program after exec.
|
||||||
'''
|
'''
|
||||||
fhandle = open(*args, **kwargs)
|
fhandle = open(*args, **kwargs)
|
||||||
if HAS_FNCTL:
|
if HAS_FCNTL:
|
||||||
# modify the file descriptor on systems with fcntl
|
# modify the file descriptor on systems with fcntl
|
||||||
# unix and unix-like systems only
|
# unix and unix-like systems only
|
||||||
try:
|
try:
|
||||||
@ -980,7 +980,7 @@ def fopen(*args, **kwargs):
|
|||||||
|
|
||||||
def flopen(*args, **kwargs):
|
def flopen(*args, **kwargs):
|
||||||
fhandle = open(*args, **kwargs)
|
fhandle = open(*args, **kwargs)
|
||||||
if HAS_FNCTL:
|
if HAS_FCNTL:
|
||||||
# modify the file descriptor on systems with fcntl
|
# modify the file descriptor on systems with fcntl
|
||||||
# unix and unix-like systems only
|
# unix and unix-like systems only
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user