mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/python_gen_empty_partition' into 'master'
app_update: Make gen_empty_partition.py Python 2 & 3 compatible See merge request idf/esp-idf!3347
This commit is contained in:
commit
66fd7e9cc3
@ -18,6 +18,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
from __future__ import print_function, division
|
from __future__ import print_function, division
|
||||||
|
from __future__ import unicode_literals
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
@ -42,9 +43,7 @@ def critical(msg):
|
|||||||
sys.stderr.write('\n')
|
sys.stderr.write('\n')
|
||||||
|
|
||||||
def generate_blanked_file(size, output_path):
|
def generate_blanked_file(size, output_path):
|
||||||
output = ""
|
output = b"\xFF" * size
|
||||||
for i in range(size):
|
|
||||||
output += b"\xFF"
|
|
||||||
try:
|
try:
|
||||||
stdout_binary = sys.stdout.buffer # Python 3
|
stdout_binary = sys.stdout.buffer # Python 3
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
Loading…
Reference in New Issue
Block a user