diff --git a/CHANGELOG.md b/CHANGELOG.md index 32e431fb..ce2cb131 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ maintainers: @caryoscelus - better debugging of update non-propagation - sec update of msgpck dependency (@chncaption) - deprecate python-3.6 as it apparently is no longer used (by active users) +- improvement in imports and naming (@caryoscelus) ### zeronet-conservancy 0.7.8.1 (2022-11-28) (0054eca9df0c9c8c2f4a78) maintainers: @caryoscelus diff --git a/zeronet.py b/zeronet.py index 1106c925..6f0e63b9 100755 --- a/zeronet.py +++ b/zeronet.py @@ -3,7 +3,11 @@ import os import sys from src.Config import config -def main(): +# fix further imports from src dir +sys.modules['Config'] = sys.modules['src.Config'] + +def launch(): + '''renamed from main to avoid clashes with main module''' if sys.version_info.major < 3: print("Error: Python 3.x is required") sys.exit(0) @@ -12,7 +16,6 @@ def main(): from greet import fancy_greet fancy_greet(config.version) - main = None try: import main main.start() @@ -131,7 +134,7 @@ def start(): import update update.update() else: - main() + launch() if __name__ == '__main__':