Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
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
Joanne Hugé
slapos.toolbox
Commits
8d620cae
Commit
8d620cae
authored
Jan 30, 2020
by
Bryton Lacquement
🚪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! Add support for Python 3
This is another fixup for commit
1c8269b2
.
parent
d634f700
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
slapos/runner/fileBrowser.py
slapos/runner/fileBrowser.py
+3
-2
No files found.
slapos/runner/fileBrowser.py
View file @
8d620cae
...
...
@@ -3,7 +3,7 @@
# pylint: disable-msg=W0311,C0301,C0103,C0111
import
datetime
import
md5
import
hashlib
import
os
import
re
import
shutil
...
...
@@ -13,6 +13,7 @@ import fnmatch
import
werkzeug
from
slapos.runner.utils
import
realpath
,
tail
,
isText
from
slapos.util
import
str2bytes
class
FileBrowser
(
object
):
...
...
@@ -59,7 +60,7 @@ class FileBrowser(object):
realfile
=
os
.
path
.
join
(
realdir
,
f
)
mdate
=
datetime
.
datetime
.
fromtimestamp
(
os
.
path
.
getmtime
(
realfile
)
).
strftime
(
"%Y-%d-%m %I:%M"
)
md5sum
=
md5
.
md5
(
realfile
).
hexdigest
()
md5sum
=
hashlib
.
md5
(
str2bytes
(
realfile
)
).
hexdigest
()
if
not
os
.
path
.
isdir
(
realfile
):
size
=
os
.
path
.
getsize
(
realfile
)
regex
=
re
.
compile
(
"(^.*)
\
.(.*)
"
, re.VERBOSE)
...
...
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