Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
scan-filesystem
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
Xavier Thompson
scan-filesystem
Commits
f61f42ca
Commit
f61f42ca
authored
Oct 19, 2020
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Plain Diff
More elegant attribute access.
See merge request
!1
parents
a51d0e87
efac620b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
python/main.py
python/main.py
+16
-16
No files found.
python/main.py
View file @
f61f42ca
...
...
@@ -38,22 +38,22 @@ def compute_hashes(entry_path):
def
stat_result_to_dict
(
stat_result
):
return
{
"st_mode"
:
stat_result
.
st_mode
if
hasattr
(
stat_result
,
"st_mode"
)
else
None
,
"st_ino"
:
stat_result
.
st_ino
if
hasattr
(
stat_result
,
"st_ino"
)
else
None
,
"st_dev"
:
stat_result
.
st_dev
if
hasattr
(
stat_result
,
"st_dev"
)
else
None
,
"st_nlink"
:
stat_result
.
st_nlink
if
hasattr
(
stat_result
,
"st_nlink"
)
else
None
,
"st_uid"
:
stat_result
.
st_uid
if
hasattr
(
stat_result
,
"st_uid"
)
else
None
,
"st_gid"
:
stat_result
.
st_gid
if
hasattr
(
stat_result
,
"st_gid"
)
else
None
,
"st_size"
:
stat_result
.
st_size
if
hasattr
(
stat_result
,
"st_size"
)
else
None
,
"st_atime"
:
stat_result
.
st_atime
if
hasattr
(
stat_result
,
"st_atime"
)
else
None
,
"st_mtime"
:
stat_result
.
st_mtime
if
hasattr
(
stat_result
,
"st_mtime"
)
else
None
,
"st_ctime"
:
stat_result
.
st_ctime
if
hasattr
(
stat_result
,
"st_ctime"
)
else
None
,
"st_blocks"
:
stat_result
.
st_blocks
if
hasattr
(
stat_result
,
"st_blocks"
)
else
None
,
"st_blksize"
:
stat_result
.
st_blksize
if
hasattr
(
stat_result
,
"st_blksize"
)
else
None
,
"st_rdev"
:
stat_result
.
st_rdev
if
hasattr
(
stat_result
,
"st_rdev"
)
else
None
,
"st_flags"
:
stat_result
.
st_flags
if
hasattr
(
stat_result
,
"st_flags"
)
else
None
,
"st_gen"
:
stat_result
.
st_gen
if
hasattr
(
stat_result
,
"st_gen"
)
else
None
,
"st_birthtime"
:
stat_result
.
st_birthtime
if
hasattr
(
stat_result
,
"st_birthtime"
)
else
None
,
"st_mode"
:
getattr
(
stat_result
,
"st_mode"
,
None
)
,
"st_ino"
:
getattr
(
stat_result
,
"st_ino"
,
None
)
,
"st_dev"
:
getattr
(
stat_result
,
"st_dev"
,
None
)
,
"st_nlink"
:
getattr
(
stat_result
,
"st_nlink"
,
None
)
,
"st_uid"
:
getattr
(
stat_result
,
"st_uid"
,
None
)
,
"st_gid"
:
getattr
(
stat_result
,
"st_gid"
,
None
)
,
"st_size"
:
getattr
(
stat_result
,
"st_size"
,
None
)
,
"st_atime"
:
getattr
(
stat_result
,
"st_atime"
,
None
)
,
"st_mtime"
:
getattr
(
stat_result
,
"st_mtime"
,
None
)
,
"st_ctime"
:
getattr
(
stat_result
,
"st_ctime"
,
None
)
,
"st_blocks"
:
getattr
(
stat_result
,
"st_blocks"
,
None
)
,
"st_blksize"
:
getattr
(
stat_result
,
"st_blksize"
,
None
)
,
"st_rdev"
:
getattr
(
stat_result
,
"st_rdev"
,
None
)
,
"st_flags"
:
getattr
(
stat_result
,
"st_flags"
,
None
)
,
"st_gen"
:
getattr
(
stat_result
,
"st_gen"
,
None
)
,
"st_birthtime"
:
getattr
(
stat_result
,
"st_birthtime"
,
None
)
,
}
...
...
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