Browse Source

disable ability to invoke `free_disk` module as script (via `python -m free_disk`, use console entry point `free-disk` instead)

Fabian Peter Hammerle 1 month ago
parent
commit
0e9efadfe6
2 changed files with 3 additions and 6 deletions
  1. 2 1
      CHANGELOG.md
  2. 1 5
      free_disk/__init__.py

+ 2 - 1
CHANGELOG.md

@@ -7,9 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 ## [Unreleased]
 ### Changed
 - made all constants and functions private
-  (only console entry point should be called directly)
 
 ### Removed
+- ability to invoke `free_disk` module as script
+  (via `python -m free_disk`, use console entry point `free-disk` instead)
 - support for `python3.4`
 
 ## [0.2.2] - 2021-04-09

+ 1 - 5
free_disk/__init__.py

@@ -7,8 +7,8 @@ import argparse
 import datetime
 import logging
 import os
-import shutil
 import re
+import shutil
 
 # https://en.wikipedia.org/wiki/Template:Quantities_of_bytes
 _DATA_SIZE_UNIT_BYTE_CONVERSION_FACTOR = {
@@ -89,7 +89,3 @@ def _main():
             removed_files_counter,
             datetime.datetime.utcfromtimestamp(last_mtime).isoformat("T"),
         )
-
-
-if __name__ == "__main__":
-    _main()