Misc changes

- made stuff pretty
- fixed bugs
- refactored stuff
This commit is contained in:
Arinerron 2018-11-09 23:17:19 -08:00
parent 099550fa34
commit 548d4ed106
No known key found for this signature in database
GPG key ID: 99383627861C62F0
7 changed files with 66 additions and 39 deletions

View file

@ -17,8 +17,10 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
'''
import onionrexceptions, onionrpeers, onionrproofs, base64, logger, onionrusers, sqlite3
import onionrexceptions, onionrpeers, onionrproofs, logger, onionrusers
import base64, sqlite3, os
from dependencies import secrets
class DaemonTools:
def __init__(self, daemon):
self.daemon = daemon
@ -131,3 +133,10 @@ class DaemonTools:
self.daemon.removeOnlinePeer(toCool)
self.daemon.cooldownPeer[toCool] = self.daemon._core._utils.getEpoch()
self.daemon.decrementThreadCount('cooldownPeer')
def runCheck(self):
if os.path.isfile('data/.runcheck'):
os.remove('data/.runcheck')
return True
return False