Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
cda2a21e
Commit
cda2a21e
authored
Apr 19, 2015
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DOC] Doc for functions.
parent
af65fed3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
utils.py
admin/utils.py
+9
-1
No files found.
admin/utils.py
View file @
cda2a21e
...
...
@@ -4,7 +4,9 @@ import linecache
from
gargantext_web.settings
import
MEDIA_ROOT
def
ensure_dir
(
user
):
# If user is new, folder does not exist yet, create it then
'''
If user is new, folder does not exist yet, create it then
'''
dirpath
=
'
%
s/corpora/
%
s'
%
(
MEDIA_ROOT
,
user
.
username
)
if
not
os
.
path
.
exists
(
dirpath
):
print
(
"Creating folder
%
s"
%
dirpath
)
...
...
@@ -12,6 +14,12 @@ def ensure_dir(user):
def
PrintException
():
'''
This function has to be used in except part to print error with:
- the file
- the line number
- an explicit error araising
'''
exc_type
,
exc_obj
,
tb
=
sys
.
exc_info
()
f
=
tb
.
tb_frame
lineno
=
tb
.
tb_lineno
...
...
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