Translate python2 to python3
*opencas.py*: changed result class to contain text values instead of bytes, translated chache configuring methods to py3, *init script*: changed regex input on raw string to work in py3. Signed-off-by: Slawomir_Jankowski <slawomir.jankowski@intel.com>
This commit is contained in:

committed by
Slawomir_Jankowski

parent
d01c26d629
commit
3d5d82f892
@@ -1,10 +1,9 @@
|
||||
#!/usr/bin/env python2
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright(c) 2012-2019 Intel Corporation
|
||||
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
#
|
||||
|
||||
from __future__ import print_function
|
||||
import argparse
|
||||
import sys
|
||||
import re
|
||||
@@ -42,7 +41,7 @@ def add_core_recursive(core, config):
|
||||
.format(core.device, core.cache_id))
|
||||
exit(3)
|
||||
core.marked = True
|
||||
match = re.match('/dev/cas(\d)-(\d).*', core.device)
|
||||
match = re.match(r'/dev/cas(\d)-(\d).*', core.device)
|
||||
if match:
|
||||
cache_id,core_id = match.groups()
|
||||
with_error = add_core_recursive(config.caches[int(cache_id)].cores[int(core_id)], config)
|
||||
|
Reference in New Issue
Block a user