Browse Source

更新 'backup/preset/app/reset.py'

junhuanchen 1 year ago
parent
commit
6b953600a6
1 changed files with 5 additions and 6 deletions
  1. 5 6
      backup/preset/app/reset.py

+ 5 - 6
backup/preset/app/reset.py

@@ -1,6 +1,5 @@
-import os
-if os.path.exists(localrep + "/cclb_launch"):
-    os.remove(localrep + "/cclb_launch")
+localrep = "/home"
+
 from maix import camera, display, image
 
 image.load_freetype("/root/preset/fonts/simhei.ttf")
@@ -8,10 +7,10 @@ hello_img = image.new(size=(320, 240), color=(0, 0, 0), mode="RGB")
 hello_img.draw_string(10, 115, 'Reset', scale=1.0, color=(255, 255, 255), thickness=1)
 display.show(hello_img)
 
+import os, git
 
-import git
-
-localrep = "/home"
+if os.path.exists(localrep + "/cclb_launch"):
+    os.remove(localrep + "/cclb_launch")
 
 git.rw()
 git.reset(localrep)