-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
1 addition
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#!/usr/bin/env python3 | ||
######################################################################### | ||
# Copyright 2013 Marcus Popp [email protected] | ||
# Copyright 2016- Christian Strassburg [email protected] | ||
######################################################################### | ||
# This file is part of SmartHomeNG. | ||
|
@@ -137,16 +136,6 @@ def read_pidfile(pidfile): | |
:return: PID of SmartHomeNG or 0 if it is not running | ||
:rtype: int | ||
""" | ||
<<<<<<< HEAD | ||
|
||
if os.path.isfile(pidfile): | ||
try: | ||
fd = open(pidfile,'r') | ||
line = fd.readline() | ||
return int(line) | ||
except: | ||
return 0 #happens if pid-file could not be opened or is empty (i.e. disc was full) | ||
======= | ||
|
||
try: | ||
if os.path.isfile(pidfile): | ||
|
@@ -156,7 +145,6 @@ def read_pidfile(pidfile): | |
return pid | ||
except ValueError: | ||
logger.warning("PID could not be read, maybe a false write or a corrupt filesystem? Please check the file system ASAP!") | ||
>>>>>>> origin/release-1.6 | ||
return 0 | ||
|
||
|
||
|
@@ -213,3 +201,4 @@ def kill(pidfile, waittime=15): | |
if p.is_running(): | ||
logger.warning("Killing process") | ||
p.kill() | ||
|