soiz commited on
Commit
4cf1b21
·
verified ·
1 Parent(s): 10dd0f8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -17,8 +17,14 @@ def clone_repo():
17
  if result != 0:
18
  print("Error: Failed to clone the repository.")
19
  else:
 
 
 
 
 
20
  # index.htmlをカレントディレクトリに移動
21
  shutil.move(os.path.join(temp_dir, 'index.html'), '.')
 
22
  # 静的ファイルをstaticディレクトリに移動
23
  if not os.path.exists('static'):
24
  os.mkdir('static')
 
17
  if result != 0:
18
  print("Error: Failed to clone the repository.")
19
  else:
20
+ # index.htmlを削除
21
+ index_html_path = os.path.join(temp_dir, 'index.html')
22
+ if os.path.exists(index_html_path):
23
+ os.remove(index_html_path)
24
+
25
  # index.htmlをカレントディレクトリに移動
26
  shutil.move(os.path.join(temp_dir, 'index.html'), '.')
27
+
28
  # 静的ファイルをstaticディレクトリに移動
29
  if not os.path.exists('static'):
30
  os.mkdir('static')