Return the size of a file, reported by os.lstat as opposed to os.stat.
(filename)
| 49 | |
| 50 | |
| 51 | def getsize(filename): |
| 52 | """Return the size of a file, reported by os.lstat as opposed to os.stat.""" |
| 53 | # Symlinks might be reported as "not found" if they are provided by a |
| 54 | # package's dependencies |
| 55 | # We use lstat to obtain the size of the symlink, as opposed to the |
| 56 | # size of the file it points to |
| 57 | # From the docstring of the os.lstat function |
| 58 | # > On platforms that do not support symbolic links, this is an |
| 59 | # > alias for stat(). |
| 60 | # https://github.com/conda/constructor/issues/311 |
| 61 | # https://docs.python.org/3/library/os.html |
| 62 | return os.lstat(filename).st_size |
| 63 | |
| 64 | |
| 65 | def warn_menu_packages_missing(precs, menu_packages): |
no outgoing calls
no test coverage detected