mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-23 16:23:56 -04:00
Tools: correct copying of binary files under Python3
This commit is contained in:
parent
e0e84880b2
commit
e312c3de30
@ -349,6 +349,10 @@ is bob we will attempt to checkout bob-AVR'''
|
|||||||
'''returns content of filepath as a string'''
|
'''returns content of filepath as a string'''
|
||||||
with open(filepath, 'rb') as fh:
|
with open(filepath, 'rb') as fh:
|
||||||
content = fh.read()
|
content = fh.read()
|
||||||
|
|
||||||
|
if running_python3:
|
||||||
|
return content.decode('ascii')
|
||||||
|
|
||||||
return content
|
return content
|
||||||
|
|
||||||
def string_in_filepath(self, string, filepath):
|
def string_in_filepath(self, string, filepath):
|
||||||
|
Loading…
Reference in New Issue
Block a user