Skip to content

Commit 1d091ab

Browse files
committed
Remove import from debug from openclpow, remove shebang, format
1 parent 08cd45f commit 1d091ab

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

src/openclpow.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
1-
#!/usr/bin/env python2.7
21
"""
32
Module for Proof of Work using OpenCL
43
"""
4+
import logging
55
import os
66
from struct import pack
77

88
import paths
99
from bmconfigparser import BMConfigParser
10-
from debug import logger
1110
from state import shutdown
1211

13-
libAvailable = True
12+
try:
13+
import numpy
14+
import pyopencl as cl
15+
libAvailable = True
16+
except ImportError:
17+
libAvailable = False
18+
19+
20+
logger = logging.getLogger('default')
21+
1422
ctx = False
1523
queue = False
1624
program = False
@@ -19,17 +27,10 @@
1927
vendors = []
2028
hash_dt = None
2129

22-
try:
23-
import pyopencl as cl
24-
import numpy
25-
except ImportError:
26-
libAvailable = False
27-
2830

2931
def initCL():
3032
"""Initlialise OpenCL engine"""
31-
# pylint: disable=global-statement
32-
global ctx, queue, program, hash_dt, libAvailable
33+
global ctx, queue, program, hash_dt # pylint: disable=global-statement
3334
if libAvailable is False:
3435
return
3536
del enabledGpus[:]

0 commit comments

Comments
 (0)