Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caucase
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Tyagov
caucase
Commits
a9a134d0
Commit
a9a134d0
authored
May 12, 2017
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove useless functions
parent
90a3652b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
38 deletions
+0
-38
caucase/utils.py
caucase/utils.py
+0
-24
caucase/web.py
caucase/web.py
+0
-14
No files found.
caucase/utils.py
View file @
a9a134d0
...
@@ -252,27 +252,3 @@ def unwrap(wrapped, getCertificate, digest_list):
...
@@ -252,27 +252,3 @@ def unwrap(wrapped, getCertificate, digest_list):
raise
BadSignature
(
'Signature mismatch: %s'
%
str
(
e
))
raise
BadSignature
(
'Signature mismatch: %s'
%
str
(
e
))
return
payload
return
payload
def
tail
(
path
,
lines
=
100
):
"""
Returns the last `lines` lines of file `path`.
"""
f
=
open
(
path
).
read
()
BUFSIZ
=
1024
f
.
seek
(
0
,
2
)
bytes
=
f
.
tell
()
size
=
lines
+
1
block
=
-
1
data
=
[]
while
size
>
0
and
bytes
>
0
:
if
bytes
-
BUFSIZ
>
0
:
f
.
seek
(
block
*
BUFSIZ
,
2
)
data
.
insert
(
0
,
f
.
read
(
BUFSIZ
))
else
:
f
.
seek
(
0
,
0
)
data
.
insert
(
0
,
f
.
read
(
bytes
))
linesFound
=
data
[
0
].
count
(
'
\
n
'
)
size
-=
linesFound
bytes
-=
BUFSIZ
block
-=
1
return
'
\
n
'
.
join
(
''
.
join
(
data
).
splitlines
()[
-
lines
:])
caucase/web.py
View file @
a9a134d0
...
@@ -676,17 +676,3 @@ def user_profile():
...
@@ -676,17 +676,3 @@ def user_profile():
return
render_template
(
'user_profile.html'
,
return
render_template
(
'user_profile.html'
,
form
=
form
)
form
=
form
)
@
app
.
route
(
'/admin/logs'
,
methods
=
[
'GET'
])
@
login_required
def
view_logs
():
content
=
""
full_log
=
request
.
args
.
get
(
'full'
,
''
)
if
app
.
config
.
log_file
and
os
.
path
.
exists
(
app
.
config
.
log_file
):
if
full_log
==
'true'
:
with
open
(
app
.
config
.
log_file
)
as
f
:
content
=
f
.
read
()
else
:
content
=
utils
.
tail
(
app
.
config
.
log_file
,
500
)
return
render_template
(
"view_logs.html"
,
content
=
content
,
filename
=
app
.
config
.
log_file
)
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