4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-02-07 03:14:34 +08:00

Merge pull request #3024 from enkiller/pr

[bsp][qemu-vexpress-a9]修复py3环境下编译,整数相除为浮点数的问题
This commit is contained in:
Bernard Xiong 2019-09-02 12:57:44 +08:00 committed by GitHub
commit 13e319f449
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,7 @@ import os
import uuid import uuid
def get_mac_address(): def get_mac_address():
mac=uuid.UUID(int = uuid.getnode()).hex[-12:] mac=uuid.UUID(int = uuid.getnode()).hex[-12:]
return "#define AUTOMAC".join([str(e/2 + 1) + ' 0x' + mac[e:e+2] + '\n' for e in range(5,11,2)]) return "#define AUTOMAC".join([str(int(e/2) + 1) + ' 0x' + mac[e:e+2] + '\n' for e in range(5,11,2)])
header = ''' header = '''
#ifndef __MAC_AUTO_GENERATE_H__ #ifndef __MAC_AUTO_GENERATE_H__