From 9ff2c9568f7e79b5827c8cedcc4e1eb4dacfcb05 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Tue, 18 Jun 2013 12:56:03 -0400 Subject: [PATCH] adjust code formatting --- src/proofofwork.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/proofofwork.py b/src/proofofwork.py index 058e4bf3..b8369087 100644 --- a/src/proofofwork.py +++ b/src/proofofwork.py @@ -8,18 +8,18 @@ import sys def _set_idle(): if 'linux' in sys.platform: - import os - os.nice(20) + import os + os.nice(20) else: - try: - sys.getwindowsversion() - import win32api,win32process,win32con - pid = win32api.GetCurrentProcessId() - handle = win32api.OpenProcess(win32con.PROCESS_ALL_ACCESS, True, pid) - win32process.SetPriorityClass(handle, win32process.IDLE_PRIORITY_CLASS) - except: - #Windows 64-bit - pass + try: + sys.getwindowsversion() + import win32api,win32process,win32con + pid = win32api.GetCurrentProcessId() + handle = win32api.OpenProcess(win32con.PROCESS_ALL_ACCESS, True, pid) + win32process.SetPriorityClass(handle, win32process.IDLE_PRIORITY_CLASS) + except: + #Windows 64-bit + pass def _pool_worker(nonce, initialHash, target, pool_size): _set_idle() @@ -70,6 +70,6 @@ def _doFastPoW(target, initialHash): def run(target, initialHash): if 'linux' in sys.platform: - return _doFastPoW(target, initialHash) + return _doFastPoW(target, initialHash) else: - return _doSafePoW(target, initialHash) + return _doSafePoW(target, initialHash)