mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-31 02:27:13 +02:00
Fix PyLint warning
This commit is contained in:
@ -815,6 +815,15 @@ def merge_dicts(d1, d2, path=None):
|
|||||||
return d1
|
return d1
|
||||||
|
|
||||||
|
|
||||||
|
def get_file_contents(path):
|
||||||
|
try:
|
||||||
|
with open(path) as f:
|
||||||
|
return f.read()
|
||||||
|
except UnicodeDecodeError:
|
||||||
|
with open(path, encoding="latin-1") as f:
|
||||||
|
return f.read()
|
||||||
|
|
||||||
|
|
||||||
def ensure_udev_rules():
|
def ensure_udev_rules():
|
||||||
|
|
||||||
def _rules_to_set(rules_path):
|
def _rules_to_set(rules_path):
|
||||||
@ -846,15 +855,6 @@ def ensure_udev_rules():
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
def get_file_contents(path):
|
|
||||||
try:
|
|
||||||
with open(path) as f:
|
|
||||||
return f.read()
|
|
||||||
except UnicodeDecodeError:
|
|
||||||
with open(path, encoding="latin-1") as f:
|
|
||||||
return f.read()
|
|
||||||
|
|
||||||
|
|
||||||
def rmtree_(path):
|
def rmtree_(path):
|
||||||
|
|
||||||
def _onerror(_, name, __):
|
def _onerror(_, name, __):
|
||||||
|
Reference in New Issue
Block a user