Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
570adc42
Commit
570adc42
authored
Dec 14, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
platform: add a --debug switch to turn on debug mode (now off by default)
parent
a7ff8a2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
dream/platform/__init__.py
dream/platform/__init__.py
+6
-3
No files found.
dream/platform/__init__.py
View file @
570adc42
...
...
@@ -40,8 +40,6 @@ global klass_name
klass_name
=
None
app
=
Flask
(
__name__
)
# Serve static file with no cache
app
.
config
[
'SEND_FILE_MAX_AGE_DEFAULT'
]
=
0
@
app
.
route
(
"/"
)
def
front_page
():
...
...
@@ -210,6 +208,7 @@ def main(*args):
help
=
'Port number to listen on'
)
parser
.
add_argument
(
'--host'
,
default
=
"localhost"
,
help
=
'Host address'
)
parser
.
add_argument
(
'--logfile'
,
help
=
'Log to file'
)
parser
.
add_argument
(
'--debug'
,
help
=
'Debug mode'
,
action
=
'store_true'
)
arguments
=
parser
.
parse_args
()
global
klass_name
klass_name
=
'dream.simulation.GUI.%s'
%
arguments
.
gui_class
...
...
@@ -218,8 +217,12 @@ def main(*args):
file_handler
.
setLevel
(
logging
.
DEBUG
)
app
.
logger
.
addHandler
(
file_handler
)
if
arguments
.
debug
:
# Serve static file with no cache
app
.
config
[
'SEND_FILE_MAX_AGE_DEFAULT'
]
=
0
# start the server
app
.
run
(
debug
=
True
,
host
=
arguments
.
host
,
port
=
arguments
.
port
)
app
.
run
(
debug
=
arguments
.
debug
,
host
=
arguments
.
host
,
port
=
arguments
.
port
)
if
__name__
==
"__main__"
:
main
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment