(path)
| 123 | |
| 124 | |
| 125 | def removeLargeFiles(path): |
| 126 | for g in glob.glob(path + '*'): |
| 127 | if g == '.' or g == '..': |
| 128 | continue |
| 129 | if os.path.islink(g): |
| 130 | continue |
| 131 | if os.path.isdir(g): |
| 132 | removeLargeFiles(g + '/') |
| 133 | elif os.path.isfile(g): |
| 134 | # remove large files |
| 135 | statinfo = os.stat(g) |
| 136 | if statinfo.st_size > 100000: |
| 137 | os.remove(g) |
| 138 | |
| 139 | # remove non-source files |
| 140 | elif not accept_filename(g): |
| 141 | os.remove(g) |
| 142 | |
| 143 | |
| 144 | def downloadpackage(filepath, outpath): |
no test coverage detected