Skip to content

Commit

Permalink
Windows and mac fix
Browse files Browse the repository at this point in the history
  • Loading branch information
revoxhere authored Sep 4, 2021
1 parent 70b244f commit 525d9e0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions PC_Miner.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ def install(package):
doing this will generate an error for devices
that don't have access to the /proc folder
"""
sys.stderr = open(os.devnull, "w")
#sys.stderr = open(os.devnull, "w")
#print("yeah")
import psutil
except ModuleNotFoundError:
print("Psutil is not installed. "
Expand Down Expand Up @@ -633,6 +634,7 @@ def mine(id: int, user_settings: list,
"""
Main section that executes the functionalities from the sections above.
"""

using_algo = get_string("using_algo")
if user_settings["algorithm"] == "XXHASH":
using_algo = get_string("using_algo_xxh")
Expand Down Expand Up @@ -784,21 +786,19 @@ def update():
pass
sleep(15)


Miner.preload()
p_list = []
if __name__ == "__main__":
from multiprocessing import freeze_support
freeze_support()

mining_start_time = time()
cpu = cpuinfo.get_cpu_info()

p_list = []
accept = Manager().Value("i", 0)
reject = Manager().Value("i", 0)
hashrate = Manager().dict()

signal(SIGINT, handler)
Miner.preload()
user_settings = Miner.load_cfg()
Miner.greeting()
fastest_pool = Client.fetch_pool()
Expand All @@ -816,3 +816,4 @@ def update():

for p in p_list:
p.join()

0 comments on commit 525d9e0

Please sign in to comment.