Pārlūkot izejas kodu

Only run flask if the script is invoked directly.

This allows the IDE to run it as a flask application, rather
than just executing script fully.
master
Chris Smith 6 gadus atpakaļ
vecāks
revīzija
2c58450005
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 2
    1
      main.py

+ 2
- 1
main.py Parādīt failu

@@ -98,4 +98,5 @@ def handle_docker_registry():
98 98
     return "", 204
99 99
 
100 100
 
101
-app.run("0.0.0.0")
101
+if __name__ == "__main__":
102
+    app.run("0.0.0.0")

Notiek ielāde…
Atcelt
Saglabāt