Przeglądaj źródła

Merge pull request #4466 from mysterywolf/python3

[python3] 部分脚本从python2语法升级到python3
Bernard Xiong 4 lat temu
rodzic
commit
6de81af04c
2 zmienionych plików z 3 dodań i 3 usunięć
  1. 2 2
      bsp/lpc43xx/M0/SConstruct
  2. 1 1
      tools/mkromfs.py

+ 2 - 2
bsp/lpc43xx/M0/SConstruct

@@ -35,12 +35,12 @@ if rtconfig.CROSS_TOOL == 'gcc':
 
     if sys.platform.startswith('linux'):
         import glob
-        ocwd = os.getcwdu()
+        ocwd = os.getcwd()
         res = os.system('cd ../Libraries/; find -name \*.o -exec rm {} \;')
         os.chdir(ocwd)
     else:
         # Assume Windows.
-        ocwd = os.getcwdu()
+        ocwd = os.getcwd()
         print('TODO: remove the object files in ../Libraries')
         os.chdir(ocwd)
 

+ 1 - 1
tools/mkromfs.py

@@ -85,7 +85,7 @@ class Folder(object):
         # TODO: take care of the unicode names
         for ent in os.listdir(u'.'):
             if os.path.isdir(ent):
-                cwd = os.getcwdu()
+                cwd = os.getcwd()
                 d = Folder(ent)
                 # depth-first
                 os.chdir(os.path.join(cwd, ent))