From b4f73697ba129b1622fd45a0f7dd086a061cb845 Mon Sep 17 00:00:00 2001 From: Alexander Bushnev Date: Tue, 29 Nov 2022 21:36:05 +0100 Subject: [PATCH] Remove legacy modules __main__ --- photo_importer/fileprop_test.py | 4 ---- photo_importer/importer.py | 12 ------------ photo_importer/rotator.py | 9 --------- 3 files changed, 25 deletions(-) diff --git a/photo_importer/fileprop_test.py b/photo_importer/fileprop_test.py index bdb42b5..0f03a92 100755 --- a/photo_importer/fileprop_test.py +++ b/photo_importer/fileprop_test.py @@ -146,7 +146,3 @@ class TestFileProp(unittest.TestCase): self.assertEqual(fp.type(), fileprop.GARBAGE) self.assertEqual(fp.time(), None) self.assertEqual(fp.ok(), False) - - -if __name__ == '__main__': - unittest.main() diff --git a/photo_importer/importer.py b/photo_importer/importer.py index 916cf07..0a5883f 100755 --- a/photo_importer/importer.py +++ b/photo_importer/importer.py @@ -114,15 +114,3 @@ class Importer(threading.Thread): def log_text(self): return self.__log.get_text() - - -if __name__ == '__main__': - import sys - - log.initLogger() - - imp = Importer(config.Config(), sys.argv[1], sys.argv[2], False) - imp.start() - imp.join() - - print(imp.status()) diff --git a/photo_importer/rotator.py b/photo_importer/rotator.py index 2327b58..081feaa 100755 --- a/photo_importer/rotator.py +++ b/photo_importer/rotator.py @@ -163,12 +163,3 @@ class Rotator(object): 'good': self.__good, 'errors': self.__errors, } - - -if __name__ == '__main__': - import sys - - rot = Rotator(config.Config(), sys.argv[1:], False) - rot.run() - - print(rot.status())