[chirp_devel] [PATCH 06/24] Fix style issues in wouxum_common.py (#2355)
Zach Welch
Tue Mar 3 00:38:01 PST 2015
# HG changeset patch
# User Zach Welch <zach at mandolincreekfarm.com>
# Fake Node ID 54cc338a03f37073501060e354610dfc306c4b98
Fix style issues in wouxum_common.py (#2355)
diff --git a/chirp/drivers/wouxun_common.py b/chirp/drivers/wouxun_common.py
index 5b51e93..9399eae 100644
--- a/chirp/drivers/wouxun_common.py
+++ b/chirp/drivers/wouxun_common.py
@@ -23,10 +23,12 @@ from chirp import util, chirp_common, memmap
LOG = logging.getLogger(__name__)
+
def wipe_memory(_mem, byte):
"""Cleanup a memory"""
_mem.set_raw(byte * (_mem.size() / 8))
-
+
+
def do_download(radio, start, end, blocksize):
"""Initiate a download of @radio between @start and @end"""
image = ""
@@ -38,23 +40,23 @@ def do_download(radio, start, end, blocksize):
resp = radio.pipe.read(length)
if len(resp) != (len(cmd) + blocksize):
print util.hexprint(resp)
- raise Exception("Failed to read full block (%i!=%i)" % \
- (len(resp),
- len(cmd) + blocksize))
-
+ raise Exception("Failed to read full block (%i!=%i)" %
+ (len(resp), len(cmd) + blocksize))
+
radio.pipe.write("\x06")
radio.pipe.read(1)
image += resp[4:]
if radio.status_fn:
- status = chirp_common.Status()
+ status = chirp_common.Status()
status.cur = i
status.max = end
status.msg = "Cloning from radio"
radio.status_fn(status)
-
+
return memmap.MemoryMap(image)
+
def do_upload(radio, start, end, blocksize):
"""Initiate an upload of @radio between @start and @end"""
ptr = start
@@ -68,7 +70,7 @@ def do_upload(radio, start, end, blocksize):
ack = radio.pipe.read(1)
if not ack == "\x06":
raise Exception("Radio did not ack block %i" % ptr)
- #radio.pipe.write(ack)
+ # radio.pipe.write(ack)
if radio.status_fn:
status = chirp_common.Status()
@@ -76,5 +78,3 @@ def do_upload(radio, start, end, blocksize):
status.max = end
status.msg = "Cloning to radio"
radio.status_fn(status)
-
-
diff --git a/tools/cpep8.blacklist b/tools/cpep8.blacklist
index d957f1c..84b4135 100644
--- a/tools/cpep8.blacklist
+++ b/tools/cpep8.blacklist
@@ -60,4 +60,3 @@
./chirp/drivers/vx8.py
./chirp/drivers/vxa700.py
./chirp/drivers/wouxun.py
-./chirp/drivers/wouxun_common.py
More information about the chirp_devel
mailing list