diff options
Diffstat (limited to 'external/poky/bitbake/lib/pyinotify.py')
-rw-r--r-- | external/poky/bitbake/lib/pyinotify.py | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/external/poky/bitbake/lib/pyinotify.py b/external/poky/bitbake/lib/pyinotify.py index 4eb03b09..6ae40a2d 100644 --- a/external/poky/bitbake/lib/pyinotify.py +++ b/external/poky/bitbake/lib/pyinotify.py @@ -1,25 +1,9 @@ -#!/usr/bin/env python - +# # pyinotify.py - python interface to inotify # Copyright (c) 2005-2015 Sebastien Martini <seb@dbzteam.org> # -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. +# SPDX-License-Identifier: MIT # -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. """ pyinotify @@ -1290,7 +1274,7 @@ class Notifier: basename = os.path.basename(sys.argv[0]) or 'pyinotify' pid_file = os.path.join(dirname, basename + '.pid') - if pid_file != False and os.path.lexists(pid_file): + if pid_file and os.path.lexists(pid_file): err = 'Cannot daemonize: pid file %s already exists.' % pid_file raise NotifierError(err) @@ -1324,7 +1308,7 @@ class Notifier: fork_daemon() # Write pid - if pid_file != False: + if pid_file: flags = os.O_WRONLY|os.O_CREAT|os.O_NOFOLLOW|os.O_EXCL fd_pid = os.open(pid_file, flags, 0o0600) os.write(fd_pid, bytes(str(os.getpid()) + '\n', |