]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
utils.py: remove unreachable code in get_file_owner_username()
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Wed, 23 Feb 2022 06:30:37 +0000 (12:00 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Thu, 24 Feb 2022 15:08:53 +0000 (08:08 -0700)
remove the return statement, that will never get executed in
get_file_owner_username().

Reported-by: LGTM
Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
ftests/utils.py

index 396f72d614c762ec5d355685d419cd51ddfba8ec..8b9860537d06bb310f0e4dfeef70b401e4ea02e5 100644 (file)
@@ -20,7 +20,6 @@
 #
 
 from run import Run
-import os
 
 
 # function to indent a block of text by cnt number of spaces
@@ -53,7 +52,6 @@ def get_file_owner_username(config, filename):
         return config.container.run(cmd, shell_bool=True)
     else:
         return Run.run(cmd, shell_bool=True)
-    return os.stat(filename).st_uid
 
 
 def get_file_owner_gid(config, filename):